class TonSdk::Boc::BocCacheType

Attributes

pin[R]
type_[R]

Public Class Methods

new_with_type_pinned(pin) click to toggle source
# File lib/ton_sdk_client/boc.rb, line 27
def self.new_with_type_pinned(pin)
  @type_ = :pinned
  @pin = pin
end
new_with_type_unpinned() click to toggle source
# File lib/ton_sdk_client/boc.rb, line 32
def self.new_with_type_unpinned
  @type_ = :unpinned
end

Public Instance Methods

to_h() click to toggle source
# File lib/ton_sdk_client/boc.rb, line 36
def to_h
  h1 = {
    type: Helper.sym_to_capitalized_case_str(@type_)
  }

  h2 = if @type_ == :pinned
    {
      pin: @pin
    }
  else
    { }
  end

  h1.merge(h2)
end