Class: Unschema::SchemaIntermediator::Call
- Inherits:
-
Object
- Object
- Unschema::SchemaIntermediator::Call
- Defined in:
- lib/unschema/schema_intermediator.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#calls ⇒ Object
readonly
Returns the value of attribute calls.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #first_arg ⇒ Object
-
#initialize(name, *args, &block) ⇒ Call
constructor
A new instance of Call.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(name, *args, &block) ⇒ Call
Returns a new instance of Call.
18 19 20 21 22 23 24 25 |
# File 'lib/unschema/schema_intermediator.rb', line 18 def initialize(name, *args, &block) @name = name @args = args @options = Hash === args.last ? args.pop : {} @calls = [] process_block!(block) if block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
16 17 18 |
# File 'lib/unschema/schema_intermediator.rb', line 16 def args @args end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
16 17 18 |
# File 'lib/unschema/schema_intermediator.rb', line 16 def block @block end |
#calls ⇒ Object (readonly)
Returns the value of attribute calls.
16 17 18 |
# File 'lib/unschema/schema_intermediator.rb', line 16 def calls @calls end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/unschema/schema_intermediator.rb', line 16 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
16 17 18 |
# File 'lib/unschema/schema_intermediator.rb', line 16 def @options end |
Instance Method Details
#first_arg ⇒ Object
27 28 29 |
# File 'lib/unschema/schema_intermediator.rb', line 27 def first_arg args.first end |