Module: ThriftClient::Simple::ComplexType::Includes

Defined in:
lib/thrift_client/simple.rb

Instance Method Summary collapse

Instance Method Details

#to_iObject



44
45
46
# File 'lib/thrift_client/simple.rb', line 44

def to_i
  self.class.type_id
end

#to_sObject



48
49
50
51
# File 'lib/thrift_client/simple.rb', line 48

def to_s
  args = self.values.map { |v| self.class.type_id == STRUCT ? v.name : v.to_s }.join(", ")
  "#{self.class.name}.new(#{args})"
end