Class: Groonga::Client::Response::Schema::Index
- Inherits:
-
Hash
- Object
- Hash
- Groonga::Client::Response::Schema::Index
- Includes:
- Hashie::Extensions::MethodAccess
- Defined in:
- lib/groonga/client/response/schema.rb
Overview
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
- #column ⇒ Object
-
#initialize(schema, raw_index) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(schema, raw_index) ⇒ Index
Returns a new instance of Index.
132 133 134 135 136 137 138 |
# File 'lib/groonga/client/response/schema.rb', line 132 def initialize(schema, raw_index) @schema = schema super() raw_index.each do |key, value| self[key] = value end end |
Instance Method Details
#[]=(key, value) ⇒ Object
140 141 142 143 144 145 146 147 |
# File 'lib/groonga/client/response/schema.rb', line 140 def []=(key, value) case key.to_sym when :table super(key, coerce_table(value)) else super end end |
#column ⇒ Object
149 150 151 152 153 154 155 156 |
# File 'lib/groonga/client/response/schema.rb', line 149 def column column_name = name if column_name.nil? column_name else table.columns[column_name] end end |