Class: Loom::MethodSignature::MatchSpec::Builder
- Inherits:
-
Object
- Object
- Loom::MethodSignature::MatchSpec::Builder
- Defined in:
- lib/loom/method_signature.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize ⇒ Builder
constructor
A new instance of Builder.
- #method_missing(name, value, *args) ⇒ Object
Constructor Details
#initialize ⇒ Builder
Returns a new instance of Builder.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/loom/method_signature.rb', line 49 def initialize @map = { :req_args => 0, :opt_args => 0, :has_rest_args => false, :keyreq_args => 0, :key_args => 0, :has_keyrest_args => false, :has_block => false } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, value, *args) ⇒ Object
61 62 63 64 |
# File 'lib/loom/method_signature.rb', line 61 def method_missing(name, value, *args) @map[name.to_sym] = value self end |