Class: Eve::API::Response::Rowset
- Inherits:
-
Array
- Object
- Array
- Eve::API::Response::Rowset
- Includes:
- Inspection, WrapObject
- Defined in:
- lib/eve/api/response/rowset.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#primary_key ⇒ Object
(also: #key)
readonly
Returns the value of attribute primary_key.
Instance Method Summary collapse
- #delegate_from(object) ⇒ Object
-
#initialize(elem, options = {}) ⇒ Rowset
constructor
A new instance of Rowset.
- #to_yaml(*args) ⇒ Object
Methods included from WrapObject
Methods included from Inspection
#inspect, #inspected_elements, #inspected_instance_variables, #inspected_name, #inspected_rowsets, #protected_instance_variables
Constructor Details
#initialize(elem, options = {}) ⇒ Rowset
Returns a new instance of Rowset.
10 11 12 13 14 |
# File 'lib/eve/api/response/rowset.rb', line 10 def initialize(elem, = {}) super() @options = parse_elem(elem) end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
7 8 9 |
# File 'lib/eve/api/response/rowset.rb', line 7 def columns @columns end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/eve/api/response/rowset.rb', line 7 def name @name end |
#primary_key ⇒ Object (readonly) Also known as: key
Returns the value of attribute primary_key.
7 8 9 |
# File 'lib/eve/api/response/rowset.rb', line 7 def primary_key @primary_key end |
Instance Method Details
#delegate_from(object) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/eve/api/response/rowset.rb', line 16 def delegate_from(object) klass = class << object; self; end var_name = name.underscore object.instance_variable_set("@#{var_name}", self) klass.send(:attr_reader, var_name) klass.send(:alias_method, var_name.camelize.dehumanize, var_name) end |
#to_yaml(*args) ⇒ Object
24 25 26 |
# File 'lib/eve/api/response/rowset.rb', line 24 def to_yaml(*args) to_a.to_yaml(*args) end |