Class: YARP::Comment
- Inherits:
-
Object
- Object
- YARP::Comment
- Defined in:
- lib/yarp.rb,
ext/yarp/extension.c
Overview
This represents a comment that was encountered during parsing.
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(type, location) ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize(type, location) ⇒ Comment
Returns a new instance of Comment.
106 107 108 109 |
# File 'lib/yarp.rb', line 106 def initialize(type, location) @type = type @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
104 105 106 |
# File 'lib/yarp.rb', line 104 def location @location end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
104 105 106 |
# File 'lib/yarp.rb', line 104 def type @type end |
Instance Method Details
#deconstruct_keys(keys) ⇒ Object
111 112 113 |
# File 'lib/yarp.rb', line 111 def deconstruct_keys(keys) { type: type, location: location } end |