Class: OkHbase::Row
- Inherits:
-
Object
- Object
- OkHbase::Row
- Includes:
- Concerns::Row
- Defined in:
- lib/ok_hbase/row.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Concerns::Row
#default_column_family, #raw_data, #row_key, #table, #timestamp
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Row
constructor
A new instance of Row.
Methods included from Concerns::Row
#attributes, #delete, #encoded_data, #id, #id=, #method_missing, #save!
Constructor Details
#initialize(opts = {}) ⇒ Row
Returns a new instance of Row.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ok_hbase/row.rb', line 5 def initialize(opts={}) opts = opts.with_indifferent_access raise ArgumentError.new "'table' must be an OkHBase::Concerns::Table. is a #{opts[:table].class}" unless opts[:table] && opts[:table].is_a?(OkHbase::Concerns::Table) @default_column_family = opts[:default_column_family] @table = opts[:table] @row_key = opts[:row_key] @raw_data = {}.with_indifferent_access opts[:raw_data].each_pair do |k, v| send(:"#{k}=", v) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OkHbase::Concerns::Row