Class: Presto::Client::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/presto/client/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Column

Returns a new instance of Column.



22
23
24
25
# File 'lib/presto/client/models.rb', line 22

def initialize(options={})
  @name = options[:name]
  @type = options[:type]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



19
20
21
# File 'lib/presto/client/models.rb', line 19

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



20
21
22
# File 'lib/presto/client/models.rb', line 20

def type
  @type
end

Class Method Details

.decode_hash(hash) ⇒ Object



27
28
29
30
31
32
# File 'lib/presto/client/models.rb', line 27

def self.decode_hash(hash)
  new(
    name: hash["name"],
    type: hash["type"],
  )
end