Class: TempoIQ::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/tempoiq/models/search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(select, selection) ⇒ Search

Returns a new instance of Search.



5
6
7
8
# File 'lib/tempoiq/models/search.rb', line 5

def initialize(select, selection)
  @select = select
  @selection = selection
end

Instance Attribute Details

#selectObject (readonly)

Returns the value of attribute select.



3
4
5
# File 'lib/tempoiq/models/search.rb', line 3

def select
  @select
end

#selectionObject (readonly)

Returns the value of attribute selection.



3
4
5
# File 'lib/tempoiq/models/search.rb', line 3

def selection
  @selection
end

Instance Method Details

#to_hashObject



10
11
12
13
14
15
# File 'lib/tempoiq/models/search.rb', line 10

def to_hash
  {
    "select" => select,
    "filters" => selection.to_hash
  }
end