class TonSdk::Utils::AddressStringFormat
types
Constants
- TYPES
Attributes
bounce[R]
test_[R]
type_[R]
url[R]
Public Class Methods
new(type_:, url: nil, test_: nil, bounce: nil)
click to toggle source
# File lib/ton_sdk_client/utils.rb, line 12 def initialize(type_:, url: nil, test_: nil, bounce: nil) unless TYPES.include?(type_) raise ArgumentError.new("type #{type_} is unknown; known types: #{TYPES}") end @type_ = type_ if @type_ == :base64 @url = url @test_ = test_ @bounce = bounce end end
Public Instance Methods
to_h()
click to toggle source
# File lib/ton_sdk_client/utils.rb, line 25 def to_h { type: Helper.sym_to_capitalized_case_str(@type_), url: @url, test: @test_, bounce: @bounce } end