class TempoIQ::Single

Attributes

function[R]
include_selection[RW]
name[R]
timestamp[R]

Public Class Methods

new(function, timestamp = nil, include_selection = false) click to toggle source
# File lib/tempoiq/models/single.rb, line 6
def initialize(function, timestamp = nil, include_selection = false)
  @name = "single"
  @include_selection = include_selection
  @function = function
  @timestamp = timestamp
end

Public Instance Methods

to_hash() click to toggle source
# File lib/tempoiq/models/single.rb, line 13
def to_hash
  hash = {
    "function" => function.to_s,
    "include_selection" => include_selection
  }
  hash["timestamp"] = timestamp.iso8601(3) if timestamp
  hash
end