Module: Validateable
- Included in:
- Adaptation::Message
- Defined in:
- lib/adaptation/validateable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *params) ⇒ Object
5 6 7 8 9 |
# File 'lib/adaptation/validateable.rb', line 5 def method_missing(symbol, *params) if(symbol.to_s =~ /(.*)_before_type_cast$/) send($1) end end |
Class Method Details
.append_features(base) ⇒ Object
11 12 13 14 |
# File 'lib/adaptation/validateable.rb', line 11 def self.append_features(base) super base.send(:include, ActiveRecord::Validations) end |
.included(base) ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/adaptation/validateable.rb', line 17 def self.included(base) # :nodoc: base.extend ClassMethods end |