Module: HasDictionary::ClassMethods
- Defined in:
- lib/has_dictionary/has_dictionary.rb
Instance Method Summary collapse
Instance Method Details
#has_dictionary(options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/has_dictionary/has_dictionary.rb', line 8 def has_dictionary( = {}) class_attribute :dic_options self. = define_method([:method]) { eval "#{[:dic_class]}.get self.#{[:field]}" } end |