Class: MiniYaml::Linter::State

Inherits:
Object
  • Object
show all
Defined in:
lib/mini_yaml/linter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_mapObject

Returns the value of attribute comment_map.



281
282
283
# File 'lib/mini_yaml/linter.rb', line 281

def comment_map
  @comment_map
end

#linesObject

Returns the value of attribute lines.



281
282
283
# File 'lib/mini_yaml/linter.rb', line 281

def lines
  @lines
end

#locationsObject

Returns the value of attribute locations.



281
282
283
# File 'lib/mini_yaml/linter.rb', line 281

def locations
  @locations
end

#nodesObject

Returns the value of attribute nodes.



281
282
283
# File 'lib/mini_yaml/linter.rb', line 281

def nodes
  @nodes
end