From 2af6de86bf5ce55b52f52f3ff28b3a6b51e51073 Mon Sep 17 00:00:00 2001 From: Gavin Laking Date: Thu, 12 Nov 2015 20:55:29 +0000 Subject: [PATCH] '#define_*' methods can be condensed into setup method. --- lib/vedeu/esc/actions.rb | 7 ------- lib/vedeu/esc/borders.rb | 7 ------- lib/vedeu/esc/colours.rb | 2 -- lib/vedeu/esc/mouse.rb | 7 ------- 4 files changed, 23 deletions(-) diff --git a/lib/vedeu/esc/actions.rb b/lib/vedeu/esc/actions.rb index 08a278ae9..88466821a 100644 --- a/lib/vedeu/esc/actions.rb +++ b/lib/vedeu/esc/actions.rb @@ -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 diff --git a/lib/vedeu/esc/borders.rb b/lib/vedeu/esc/borders.rb index 11779828d..8a2eb3f3d 100644 --- a/lib/vedeu/esc/borders.rb +++ b/lib/vedeu/esc/borders.rb @@ -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 diff --git a/lib/vedeu/esc/colours.rb b/lib/vedeu/esc/colours.rb index ae159431f..55da235d6 100644 --- a/lib/vedeu/esc/colours.rb +++ b/lib/vedeu/esc/colours.rb @@ -74,8 +74,6 @@ def setup! define_foregrounds! end - private - # @return [void] def define_backgrounds! background_codes.each do |key, code| diff --git a/lib/vedeu/esc/mouse.rb b/lib/vedeu/esc/mouse.rb index 44c7e0072..fcfe566b4 100644 --- a/lib/vedeu/esc/mouse.rb +++ b/lib/vedeu/esc/mouse.rb @@ -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