Class: Ppson::Arguments
- Inherits:
-
Object
- Object
- Ppson::Arguments
- Includes:
- Enumerable
- Defined in:
- lib/ppjson/arguments.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #argument_instance(argument_data, options) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(arguments, options) ⇒ Arguments
constructor
A new instance of Arguments.
Constructor Details
#initialize(arguments, options) ⇒ Arguments
Returns a new instance of Arguments.
7 8 9 10 |
# File 'lib/ppjson/arguments.rb', line 7 def initialize(arguments, ) @arguments = arguments @options = end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
5 6 7 |
# File 'lib/ppjson/arguments.rb', line 5 def arguments @arguments end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/ppjson/arguments.rb', line 5 def @options end |
Instance Method Details
#argument_instance(argument_data, options) ⇒ Object
18 19 20 |
# File 'lib/ppjson/arguments.rb', line 18 def argument_instance(argument_data, ) raise "Must be implemented in child class" end |
#each(&block) ⇒ Object
12 13 14 15 16 |
# File 'lib/ppjson/arguments.rb', line 12 def each(&block) arguments.each do |argument| block.call(argument_instance(argument, )) end end |