class GroongaClientModel::Schema::Tables
Public Class Methods
new(raw_schema, raw_tables)
click to toggle source
# File lib/groonga_client_model/schema.rb, line 36 def initialize(raw_schema, raw_tables) @raw_schema = raw_schema @raw_tables = raw_tables end
Public Instance Methods
[](name)
click to toggle source
# File lib/groonga_client_model/schema.rb, line 41 def [](name) name = name.to_s if name.is_a?(Symbol) raw_table = @raw_tables[name] raise Error, "table doesn't exist: <#{name.inspect}>" if raw_table.nil? Table.new(@raw_schema, raw_table) end
exist?(name)
click to toggle source
# File lib/groonga_client_model/schema.rb, line 48 def exist?(name) @raw_tables.key?(name) end