Class: GroongaClientModel::Schema::Columns

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/groonga_client_model/schema.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_schema, raw_columns) ⇒ Columns



95
96
97
98
# File 'lib/groonga_client_model/schema.rb', line 95

def initialize(raw_schema, raw_columns)
  @raw_schema = raw_schema
  @raw_columns = raw_columns
end

Instance Method Details

#[](name) ⇒ Object



108
109
110
# File 'lib/groonga_client_model/schema.rb', line 108

def [](name)
  @raw_columns[normalize_name(name)]
end

#eachObject



112
113
114
115
116
# File 'lib/groonga_client_model/schema.rb', line 112

def each
  @raw_columns.each do |name, column|
    yield(name, column)
  end
end

#exist?(name) ⇒ Boolean



100
101
102
# File 'lib/groonga_client_model/schema.rb', line 100

def exist?(name)
  @raw_columns.key?(normalize_name(name))
end

#namesObject



104
105
106
# File 'lib/groonga_client_model/schema.rb', line 104

def names
  @raw_columns.keys
end