Class: YPS::Value
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- YPS::Value
- Defined in:
- lib/yps/value.rb
Overview
Value is a wrapper class for a parsed object and serves two main functions:
-
As a placeholder and accessor for the position information of the wrapped object (via the #position method).
-
Forwarding received method calls to the wrapped object.
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Accessor for the position information of the wrapped object.
Instance Method Summary collapse
-
#initialize(value, position) ⇒ Value
constructor
:nodoc:.
-
#value ⇒ Object
Accessor for the wrapped object.
Constructor Details
#initialize(value, position) ⇒ Value
:nodoc:
55 56 57 58 |
# File 'lib/yps/value.rb', line 55 def initialize(value, position) # :nodoc: super(value) @position = position end |
Instance Attribute Details
#position ⇒ Object (readonly)
Accessor for the position information of the wrapped object
68 69 70 |
# File 'lib/yps/value.rb', line 68 def position @position end |
Instance Method Details
#value ⇒ Object
Accessor for the wrapped object
62 63 64 |
# File 'lib/yps/value.rb', line 62 def value __getobj__ end |