Class: Type::Conditions
Instance Method Summary collapse
-
#initialize(type) ⇒ Conditions
constructor
A new instance of Conditions.
-
#method_missing(s, *a, &b) ⇒ Object
def __conditions__ @__conditions__ ||= [] end.
Constructor Details
#initialize(type) ⇒ Conditions
Returns a new instance of Conditions.
90 91 92 |
# File 'lib/platypus/type.rb', line 90 def initialize(type) @type = type end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(s, *a, &b) ⇒ Object
def __conditions__
@__conditions__ ||= []
end
98 99 100 101 102 103 |
# File 'lib/platypus/type.rb', line 98 def method_missing(s, *a, &b) @type.condition do |x| x.__send__(s, *a, &b) end #__conditions__ << [s, a, b] end |