Class: GroongaSchema::Schema
- Inherits:
-
Object
- Object
- GroongaSchema::Schema
- Defined in:
- lib/groonga-schema/schema.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#plugins ⇒ Object
readonly
Returns the value of attribute plugins.
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
Instance Method Summary collapse
- #apply_command(command) ⇒ Object
-
#initialize ⇒ Schema
constructor
A new instance of Schema.
Constructor Details
#initialize ⇒ Schema
Returns a new instance of Schema.
26 27 28 29 30 |
# File 'lib/groonga-schema/schema.rb', line 26 def initialize @plugins = [] @tables = {} @columns = {} end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
25 26 27 |
# File 'lib/groonga-schema/schema.rb', line 25 def columns @columns end |
#plugins ⇒ Object (readonly)
Returns the value of attribute plugins.
23 24 25 |
# File 'lib/groonga-schema/schema.rb', line 23 def plugins @plugins end |
#tables ⇒ Object (readonly)
Returns the value of attribute tables.
24 25 26 |
# File 'lib/groonga-schema/schema.rb', line 24 def tables @tables end |
Instance Method Details
#apply_command(command) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/groonga-schema/schema.rb', line 32 def apply_command(command) case command.command_name when "register" plugin = Plugin.new(command.path) @plugins << plugin when "plugin_register" plugin = Plugin.new(command.name) @plugins << plugin when "table_create" apply_command_table_create(command) when "column_create" apply_command_column_create(command) end end |