Class: Kdep::YamlDuplicateKeys::Duplicate
- Inherits:
-
Struct
- Object
- Struct
- Kdep::YamlDuplicateKeys::Duplicate
- Defined in:
- lib/kdep/yaml_duplicate_keys.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#first_line ⇒ Object
Returns the value of attribute first_line.
-
#key_path ⇒ Object
Returns the value of attribute key_path.
-
#repeat_line ⇒ Object
Returns the value of attribute repeat_line.
Instance Method Summary collapse
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
21 22 23 |
# File 'lib/kdep/yaml_duplicate_keys.rb', line 21 def file @file end |
#first_line ⇒ Object
Returns the value of attribute first_line
21 22 23 |
# File 'lib/kdep/yaml_duplicate_keys.rb', line 21 def first_line @first_line end |
#key_path ⇒ Object
Returns the value of attribute key_path
21 22 23 |
# File 'lib/kdep/yaml_duplicate_keys.rb', line 21 def key_path @key_path end |
#repeat_line ⇒ Object
Returns the value of attribute repeat_line
21 22 23 |
# File 'lib/kdep/yaml_duplicate_keys.rb', line 21 def repeat_line @repeat_line end |
Instance Method Details
#to_s ⇒ Object
22 23 24 25 |
# File 'lib/kdep/yaml_duplicate_keys.rb', line 22 def to_s "#{file}:#{repeat_line} duplicate key '#{key_path}' (first declared at line " \ "#{first_line}) -- YAML keeps the last block and discards the earlier one" end |