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
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ruby_sync.rb', line 40 def option *names names.each do |name| name do |value| class_def name do value end "get_#{name}" do value end end end end |