Class: TempoIQ::Single
- Inherits:
-
Object
- Object
- TempoIQ::Single
- Defined in:
- lib/tempoiq/models/single.rb
Instance Attribute Summary collapse
-
#function ⇒ Object
readonly
Returns the value of attribute function.
-
#include_selection ⇒ Object
Returns the value of attribute include_selection.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(function, timestamp = nil, include_selection = false) ⇒ Single
constructor
A new instance of Single.
- #to_hash ⇒ Object
Constructor Details
#initialize(function, timestamp = nil, include_selection = false) ⇒ Single
Returns a new instance of Single.
6 7 8 9 10 11 |
# File 'lib/tempoiq/models/single.rb', line 6 def initialize(function, = nil, include_selection = false) @name = "single" @include_selection = include_selection @function = function @timestamp = end |
Instance Attribute Details
#function ⇒ Object (readonly)
Returns the value of attribute function.
3 4 5 |
# File 'lib/tempoiq/models/single.rb', line 3 def function @function end |
#include_selection ⇒ Object
Returns the value of attribute include_selection.
3 4 5 |
# File 'lib/tempoiq/models/single.rb', line 3 def include_selection @include_selection end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/tempoiq/models/single.rb', line 3 def name @name end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/tempoiq/models/single.rb', line 3 def @timestamp end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/tempoiq/models/single.rb', line 13 def to_hash hash = { "function" => function.to_s, "include_selection" => include_selection } hash["timestamp"] = .iso8601(3) if hash end |