Class: InsertInto::Row
- Inherits:
-
Object
show all
- Defined in:
- lib/insert_into/row.rb
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Row
Returns a new instance of Row.
3
4
5
|
# File 'lib/insert_into/row.rb', line 3
def initialize
@data = {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
15
16
17
|
# File 'lib/insert_into/row.rb', line 15
def method_missing(m, *args, &block)
@data[m] = args[0]
end
|
Instance Method Details
#[](key) ⇒ Object
11
12
13
|
# File 'lib/insert_into/row.rb', line 11
def [](key)
@data[key]
end
|
#column_names ⇒ Object
7
8
9
|
# File 'lib/insert_into/row.rb', line 7
def column_names
@data.keys
end
|