Class: Travis::Yaml::Serializer::Yaml::Tagged
- Inherits:
-
Object
- Object
- Travis::Yaml::Serializer::Yaml::Tagged
- Defined in:
- lib/travis/yaml/serializer/yaml.rb
Instance Attribute Summary collapse
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #encode_with(coder) ⇒ Object
-
#initialize(tag, value) ⇒ Tagged
constructor
A new instance of Tagged.
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
#tag ⇒ Object
Returns the value of attribute tag.
7 8 9 |
# File 'lib/travis/yaml/serializer/yaml.rb', line 7 def tag @tag end |
#value ⇒ Object
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 |