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
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ruby_sync.rb', line 31 def option *names names.each do |name| name do |value| class_def name do value end "get_#{name}" do value end end end end |