Class: Puffer::Filters::Diapason

Inherits:
Struct
  • Object
show all
Defined in:
lib/puffer/filters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject

Returns the value of attribute from

Returns:

  • (Object)

    the current value of from



3
4
5
# File 'lib/puffer/filters.rb', line 3

def from
  @from
end

#tillObject

Returns the value of attribute till

Returns:

  • (Object)

    the current value of till



3
4
5
# File 'lib/puffer/filters.rb', line 3

def till
  @till
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/puffer/filters.rb', line 4

def empty?
  from.blank? && till.blank?
end

#persisted?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/puffer/filters.rb', line 8

def persisted?
  false
end

#to_query(key) ⇒ Object



12
13
14
# File 'lib/puffer/filters.rb', line 12

def to_query(key)
  {:from => from, :till => till}.to_query(key)
end