Class: TezosClient::Tools::HashToMicheline::Base
- Inherits:
-
Object
- Object
- TezosClient::Tools::HashToMicheline::Base
- Defined in:
- lib/tezos_client/tools/hash_to_micheline/base.rb
Direct Known Subclasses
Address, Bytes, Contract, Int, Key, Nat, Option, Pair, 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/hash_to_micheline/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/hash_to_micheline/base.rb', line 12 def data @data end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/tezos_client/tools/hash_to_micheline/base.rb', line 12 def type @type end |
Instance Method Details
#value ⇒ Object
14 15 16 17 |
# File 'lib/tezos_client/tools/hash_to_micheline/base.rb', line 14 def value @data = anonymous? ? @data : @data.fetch(var_name) encode end |