Class: Psych::Pure::Comment
- Inherits:
-
Object
- Object
- Psych::Pure::Comment
- Defined in:
- lib/psych/pure.rb
Overview
Represents a comment in the input.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #end_column ⇒ Object
- #end_line ⇒ Object
-
#initialize(source, pos_start, pos_end, value, inline) ⇒ Comment
constructor
A new instance of Comment.
- #inline? ⇒ Boolean
- #start_column ⇒ Object
- #start_line ⇒ Object
Constructor Details
#initialize(source, pos_start, pos_end, value, inline) ⇒ Comment
144 145 146 147 148 149 150 |
# File 'lib/psych/pure.rb', line 144 def initialize(source, pos_start, pos_end, value, inline) @source = source @pos_start = pos_start @pos_end = pos_end @value = value @inline = inline end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
142 143 144 |
# File 'lib/psych/pure.rb', line 142 def value @value end |
Instance Method Details
#end_column ⇒ Object
168 169 170 |
# File 'lib/psych/pure.rb', line 168 def end_column @source.column(@pos_end) end |
#end_line ⇒ Object
164 165 166 |
# File 'lib/psych/pure.rb', line 164 def end_line @source.line(@pos_end) end |
#inline? ⇒ Boolean
152 153 154 |
# File 'lib/psych/pure.rb', line 152 def inline? @inline end |
#start_column ⇒ Object
160 161 162 |
# File 'lib/psych/pure.rb', line 160 def start_column @source.column(@pos_start) end |
#start_line ⇒ Object
156 157 158 |
# File 'lib/psych/pure.rb', line 156 def start_line @source.line(@pos_start) end |