Class: EverSdk::Tvm::AccountForExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/ever_sdk_client/tvm.rb

Constant Summary collapse

TYPES =
[:none, :uninit, :account]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bocObject (readonly)

Returns the value of attribute boc.



35
36
37
# File 'lib/ever_sdk_client/tvm.rb', line 35

def boc
  @boc
end

#type_Object (readonly)

Returns the value of attribute type_.



35
36
37
# File 'lib/ever_sdk_client/tvm.rb', line 35

def type_
  @type_
end

#unlimited_balanceObject (readonly)

Returns the value of attribute unlimited_balance.



35
36
37
# File 'lib/ever_sdk_client/tvm.rb', line 35

def unlimited_balance
  @unlimited_balance
end

Class Method Details

.new_with_type_account(boc:, unlimited_balance: nil) ⇒ Object



45
46
47
48
49
# File 'lib/ever_sdk_client/tvm.rb', line 45

def self.(boc:, unlimited_balance: nil)
  @type_ = :account
  @boc = boc
  @unlimited_balance = unlimited_balance
end

.new_with_type_noneObject



37
38
39
# File 'lib/ever_sdk_client/tvm.rb', line 37

def self.new_with_type_none
  @type_ = :none
end

.new_with_type_uninitObject



41
42
43
# File 'lib/ever_sdk_client/tvm.rb', line 41

def self.new_with_type_uninit
  @type_ = :uninit
end

Instance Method Details

#to_hObject



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/ever_sdk_client/tvm.rb', line 51

def to_h
  h1 = case @type_
  when :none, :uninit
    {
      type: Helper.sym_to_capitalized_case_str(@type_),
    }
  when :account
    {
      type: Helper.sym_to_capitalized_case_str(@type_),
      boc: @boc,
      unlimited_balance: @unlimited_balance
    }
  end
end