Class: TreeHaver::BinaryScalarValue
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::BinaryScalarValue
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#format ⇒ Object
Returns the value of attribute format.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#raw_value ⇒ Object
Returns the value of attribute raw_value.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def description @description end |
#encoding ⇒ Object
Returns the value of attribute encoding
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def encoding @encoding end |
#format ⇒ Object
Returns the value of attribute format
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def format @format end |
#kind ⇒ Object
Returns the value of attribute kind
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def kind @kind end |
#raw_value ⇒ Object
Returns the value of attribute raw_value
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def raw_value @raw_value end |
#symbol ⇒ Object
Returns the value of attribute symbol
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def symbol @symbol end |
#value ⇒ Object
Returns the value of attribute value
768 769 770 |
# File 'lib/tree_haver/contracts.rb', line 768 def value @value end |
Instance Method Details
#to_h ⇒ Object
770 771 772 773 774 775 776 777 778 779 780 |
# File 'lib/tree_haver/contracts.rb', line 770 def to_h { kind: kind, **(value.nil? ? {} : { value: value }), **(symbol.nil? ? {} : { symbol: symbol }), **(raw_value.nil? ? {} : { raw_value: raw_value }), **(encoding.nil? ? {} : { encoding: encoding }), **(format.nil? ? {} : { format: format }), **(description.nil? ? {} : { description: description }) } end |