Class: Module
Instance Method Summary collapse
-
#option(*names) ⇒ Object
Add an option that will be defined by a class method, stored in a class variable and accessible as an instance method.
Instance Method Details
#option(*names) ⇒ Object
Add an option that will be defined by a class method, stored in a class variable and accessible as an instance method
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/ruby_sync.rb', line 50 def option *names names.each do |name| name do |value| class_def name do value end "get_#{name}" do value end end end end |