Class: MiniYaml::Linter::State
- Inherits:
-
Object
- Object
- MiniYaml::Linter::State
- Defined in:
- lib/mini_yaml/linter.rb
Instance Attribute Summary collapse
-
#comment_map ⇒ Object
Returns the value of attribute comment_map.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#locations ⇒ Object
Returns the value of attribute locations.
-
#nodes ⇒ Object
Returns the value of attribute nodes.
Instance Method Summary collapse
-
#initialize(yaml) ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize(yaml) ⇒ State
Returns a new instance of State.
282 283 284 285 286 287 |
# File 'lib/mini_yaml/linter.rb', line 282 def initialize(yaml) @lines = yaml.split("\n") @comment_map = {} @nodes = [] @locations = [] end |
Instance Attribute Details
#comment_map ⇒ Object
Returns the value of attribute comment_map.
281 282 283 |
# File 'lib/mini_yaml/linter.rb', line 281 def comment_map @comment_map end |
#lines ⇒ Object
Returns the value of attribute lines.
281 282 283 |
# File 'lib/mini_yaml/linter.rb', line 281 def lines @lines end |
#locations ⇒ Object
Returns the value of attribute locations.
281 282 283 |
# File 'lib/mini_yaml/linter.rb', line 281 def locations @locations end |
#nodes ⇒ Object
Returns the value of attribute nodes.
281 282 283 |
# File 'lib/mini_yaml/linter.rb', line 281 def nodes @nodes end |