Class: Conquiro::Criteria
- Inherits:
-
Struct
- Object
- Struct
- Conquiro::Criteria
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/conquiro/criteria.rb
Constant Summary collapse
- DEFAULT_COUNTRY =
'us'
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#country ⇒ Object
Returns the value of attribute country.
-
#entity ⇒ Object
Returns the value of attribute entity.
-
#explicit ⇒ Object
Returns the value of attribute explicit.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#media ⇒ Object
Returns the value of attribute media.
-
#term ⇒ Object
Returns the value of attribute term.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def attribute @attribute end |
#country ⇒ Object
Returns the value of attribute country
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def country @country end |
#entity ⇒ Object
Returns the value of attribute entity
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def entity @entity end |
#explicit ⇒ Object
Returns the value of attribute explicit
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def explicit @explicit end |
#limit ⇒ Object
Returns the value of attribute limit
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def limit @limit end |
#media ⇒ Object
Returns the value of attribute media
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def media @media end |
#term ⇒ Object
Returns the value of attribute term
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def term @term end |
#version ⇒ Object
Returns the value of attribute version
5 6 7 |
# File 'lib/conquiro/criteria.rb', line 5 def version @version end |
Instance Method Details
#params ⇒ Object
16 17 18 |
# File 'lib/conquiro/criteria.rb', line 16 def params self.to_h.select { |_,value| value.present? } end |