Class: Terastream::Query::Record
- Inherits:
-
Object
- Object
- Terastream::Query::Record
- Defined in:
- lib/terastream/query/records_builder.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Record
constructor
A new instance of Record.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Record
Returns a new instance of Record.
18 19 20 |
# File 'lib/terastream/query/records_builder.rb', line 18 def initialize(data = {}) @data = OpenStruct.new(data) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/terastream/query/records_builder.rb', line 22 def method_missing(name, *args, &block) if data.respond_to?(name) data.send(:name, *args, &block) else super end end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
16 17 18 |
# File 'lib/terastream/query/records_builder.rb', line 16 def data @data end |