Class: Smck::TaggedValue
- Inherits:
-
Object
- Object
- Smck::TaggedValue
- Defined in:
- lib/smck/tagged_value.rb
Overview
TaggedValue represents a YAML value with a tag, e.g. !tag ‘value’
Instance Method Summary collapse
- #deconstruct_keys(_) ⇒ Object
-
#initialize(tag, value) ⇒ TaggedValue
constructor
A new instance of TaggedValue.
Constructor Details
#initialize(tag, value) ⇒ TaggedValue
Returns a new instance of TaggedValue.
8 9 10 11 |
# File 'lib/smck/tagged_value.rb', line 8 def initialize(tag, value) @tag = tag @value = value end |
Instance Method Details
#deconstruct_keys(_) ⇒ Object
13 14 15 |
# File 'lib/smck/tagged_value.rb', line 13 def deconstruct_keys(_) { tag: @tag, value: @value } end |