Class: Yaml::Sort::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/yaml/sort/value.rb

Direct Known Subclasses

Alias, Dictionary, List, Scalar

Instance Method Summary collapse

Constructor Details

#initializeValue

Returns a new instance of Value.



6
7
8
# File 'lib/yaml/sort/value.rb', line 6

def initialize
  @comment = []
end

Instance Method Details

#commentsObject



14
15
16
# File 'lib/yaml/sort/value.rb', line 14

def comments
  @comment.join
end

#sortObject



18
19
20
# File 'lib/yaml/sort/value.rb', line 18

def sort
  self
end

#to_sObject



10
11
12
# File 'lib/yaml/sort/value.rb', line 10

def to_s(*)
  comments
end