Class: Conquiro::Criteria

Inherits:
Struct
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/conquiro/criteria.rb

Constant Summary collapse

DEFAULT_COUNTRY =
'us'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute

Returns:

  • (Object)

    the current value of attribute



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def attribute
  @attribute
end

#countryObject

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def country
  @country
end

#entityObject

Returns the value of attribute entity

Returns:

  • (Object)

    the current value of entity



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def entity
  @entity
end

#explicitObject

Returns the value of attribute explicit

Returns:

  • (Object)

    the current value of explicit



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def explicit
  @explicit
end

#limitObject

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def limit
  @limit
end

#mediaObject

Returns the value of attribute media

Returns:

  • (Object)

    the current value of media



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def media
  @media
end

#termObject

Returns the value of attribute term

Returns:

  • (Object)

    the current value of term



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def term
  @term
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



5
6
7
# File 'lib/conquiro/criteria.rb', line 5

def version
  @version
end

Instance Method Details

#paramsObject



16
17
18
# File 'lib/conquiro/criteria.rb', line 16

def params
  self.to_h.select { |_,value| value.present? }
end