Class: Gifts::UserTable
Instance Method Summary
collapse
Methods inherited from TableBase
#initialize
Instance Method Details
#add(name) ⇒ Object
15
16
17
|
# File 'lib/gifts/user_table.rb', line 15
def add(name)
db_user = table[name] || table.add(name, name: name)
end
|
#define_schema ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/gifts/user_table.rb', line 7
def define_schema
Groonga::Schema.define do |schema|
schema.create_table(table_name, type: :hash) do |table|
table.string("name")
end
end
end
|
#table_name ⇒ Object
3
4
5
|
# File 'lib/gifts/user_table.rb', line 3
def table_name
"user"
end
|