Class: Travis::Yaml::Serializer::Yaml::Tagged

Inherits:
Object
  • Object
show all
Defined in:
lib/travis/yaml/serializer/yaml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tag, value) ⇒ Tagged

Returns a new instance of Tagged.



8
9
10
# File 'lib/travis/yaml/serializer/yaml.rb', line 8

def initialize(tag, value)
  @tag, @value = tag, value
end

Instance Attribute Details

#tagObject

Returns the value of attribute tag.



7
8
9
# File 'lib/travis/yaml/serializer/yaml.rb', line 7

def tag
  @tag
end

#valueObject

Returns the value of attribute value.



7
8
9
# File 'lib/travis/yaml/serializer/yaml.rb', line 7

def value
  @value
end

Instance Method Details

#encode_with(coder) ⇒ Object



12
13
14
# File 'lib/travis/yaml/serializer/yaml.rb', line 12

def encode_with(coder)
  coder.represent_scalar(tag, value)
end