Class: TezosClient::Tools::ConvertToHash::Base
- Inherits:
-
Object
- Object
- TezosClient::Tools::ConvertToHash::Base
- Defined in:
- lib/tezos_client/tools/convert_to_hash/base.rb
Direct Known Subclasses
Address, BigMap, Bytes, Int, Key, KeyHash, List, Map, Nat, Option, Pair, Set, Signature, String, Timestamp
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data:, type:) ⇒ Base
constructor
A new instance of Base.
- #value ⇒ Object
Constructor Details
#initialize(data:, type:) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/tezos_client/tools/convert_to_hash/base.rb', line 7 def initialize(data:, type:) @data = data @type = type end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
12 13 14 |
# File 'lib/tezos_client/tools/convert_to_hash/base.rb', line 12 def data @data end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/tezos_client/tools/convert_to_hash/base.rb', line 12 def type @type end |
Instance Method Details
#value ⇒ Object
14 15 16 |
# File 'lib/tezos_client/tools/convert_to_hash/base.rb', line 14 def value anonymous? ? decode : { var_name => decode } end |