Module: Cnab::Definitions::Helper
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
4
5
6
7
|
# File 'lib/cnab/definitions/helper.rb', line 4
def method_missing(method_name)
range = @definition[method_name.to_s].split('..')
Integer(range[0])..Integer(range[1])
end
|
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
9
10
11
12
|
# File 'lib/cnab/definitions/helper.rb', line 9
def respond_to_missing?(method_name, include_private = false)
return true unless @definition[method_name.to_s].nil?
super
end
|