Class: HornOfPlenty::Queries::Fetch

Inherits:
Object
  • Object
show all
Defined in:
lib/horn_of_plenty/queries/fetch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Fetch

Returns a new instance of Fetch.



7
8
9
# File 'lib/horn_of_plenty/queries/fetch.rb', line 7

def initialize(attrs)
  self.query = attrs.dup
end

Instance Attribute Details

#queryObject

Returns the value of attribute query.



5
6
7
# File 'lib/horn_of_plenty/queries/fetch.rb', line 5

def query
  @query
end

Instance Method Details

#to_hObject Also known as: to_params



11
12
13
# File 'lib/horn_of_plenty/queries/fetch.rb', line 11

def to_h
  @to_h ||= translate(query)
end