Class: Groonga::Client::Response::Schema::Column
- Inherits:
-
Hash
- Object
- Hash
- Groonga::Client::Response::Schema::Column
- Includes:
- Hashie::Extensions::MethodAccess
- Defined in:
- lib/groonga/client/response/schema.rb
Overview
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
- #have_full_text_search_index? ⇒ Boolean
-
#initialize(schema, raw_column) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(schema, raw_column) ⇒ Column
Returns a new instance of Column.
214 215 216 217 218 219 220 |
# File 'lib/groonga/client/response/schema.rb', line 214 def initialize(schema, raw_column) @schema = schema super() raw_column.each do |key, value| self[key] = value end end |
Instance Method Details
#[]=(key, value) ⇒ Object
222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/groonga/client/response/schema.rb', line 222 def []=(key, value) case key.to_sym when :indexes super(key, coerce_indexes(value)) when :value_type value = ValueType.new(value) unless value.nil? super(key, value) when :command super(key, Command.new(value)) else super end end |
#have_full_text_search_index? ⇒ Boolean
236 237 238 239 240 |
# File 'lib/groonga/client/response/schema.rb', line 236 def have_full_text_search_index? indexes.any? do |index| index.full_text_searchable? end end |