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
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def description @description end |
#encoding ⇒ Object
Returns the value of attribute encoding
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def encoding @encoding end |
#format ⇒ Object
Returns the value of attribute format
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def format @format end |
#kind ⇒ Object
Returns the value of attribute kind
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def kind @kind end |
#raw_value ⇒ Object
Returns the value of attribute raw_value
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def raw_value @raw_value end |
#symbol ⇒ Object
Returns the value of attribute symbol
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def symbol @symbol end |
#value ⇒ Object
Returns the value of attribute value
165 166 167 |
# File 'lib/tree_haver/contracts.rb', line 165 def value @value end |
Instance Method Details
#to_h ⇒ Object
166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/tree_haver/contracts.rb', line 166 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 |