Class: AliOts::Metas::TablePrimaryKey

Inherits:
Object
  • Object
show all
Defined in:
lib/ali_ots/metas/table_primary_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ TablePrimaryKey

Returns a new instance of TablePrimaryKey.



7
8
9
10
# File 'lib/ali_ots/metas/table_primary_key.rb', line 7

def initialize(name, type)
  self.name = name
  self.type = type
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/ali_ots/metas/table_primary_key.rb', line 4

def name
  @name
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/ali_ots/metas/table_primary_key.rb', line 5

def type
  @type
end

Instance Method Details

#to_sObject



12
13
14
15
16
17
18
# File 'lib/ali_ots/metas/table_primary_key.rb', line 12

def to_s
%Q{primary_key {
name: "#{name}"
type: #{type}
    }
  }
end