Class: QueryReport::Row
- Inherits:
-
Object
- Object
- QueryReport::Row
- Defined in:
- lib/query_report/row.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, value) ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize(name, value) ⇒ Row
Returns a new instance of Row.
5 6 7 8 9 |
# File 'lib/query_report/row.rb', line 5 def initialize(name, value) @name = name @value = value @type = value.kind_of?(String) ? 'string' : 'number' end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/query_report/row.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/query_report/row.rb', line 3 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/query_report/row.rb', line 3 def value @value end |