Class: TezosClient::Tools::HashToMicheline::Base

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dataObject

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

#typeObject

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

#valueObject



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