Module: XMLable::Mixins::Castable::ClassMethods
- Defined in:
- lib/xmlable/mixins/castable.rb
Constant Summary collapse
- CAST_METHODS =
Returns retuns list of the setup methods.
%i[cast export export_to_json export_to_xml empty]
Instance Method Summary collapse
-
#method_missing(name, *args, &block) ⇒ Object
Override method missing to get the setup methods be available.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
Override method missing to get the setup methods be available
86 87 88 89 |
# File 'lib/xmlable/mixins/castable.rb', line 86 def method_missing(name, *args, &block) return super unless CAST_METHODS.include?(name) define_method("__#{name}", &block) if block_given? end |