Skip to content

Commit

Permalink
'#define_*' methods can be condensed into setup method.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlaking committed Nov 12, 2015
1 parent dda1219 commit 2af6de8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
7 changes: 0 additions & 7 deletions lib/vedeu/esc/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ def characters

# @return [void]
def setup!
define_actions!
end

private

# @return [void]
def define_actions!
characters.each { |key, code| define_method(key) { code } }
end

Expand Down
7 changes: 0 additions & 7 deletions lib/vedeu/esc/borders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ def characters

# @return [void]
def setup!
define_borders!
end

private

# @return [void]
def define_borders!
characters.each { |key, code| define_method(key) { code } }
end

Expand Down
2 changes: 0 additions & 2 deletions lib/vedeu/esc/colours.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ def setup!
define_foregrounds!
end

private

# @return [void]
def define_backgrounds!
background_codes.each do |key, code|
Expand Down
7 changes: 0 additions & 7 deletions lib/vedeu/esc/mouse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ def mouse_codes

# @return [void]
def setup!
define_actions!
end

private

# @return [void]
def define_actions!
mouse_codes.each { |key, code| define_method(key) { code } }
end

Expand Down

0 comments on commit 2af6de8

Please sign in to comment.