Class: Facet

Inherits:
Struct
  • Object
show all
Defined in:
public/app/models/facet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, key, count) ⇒ Facet

Returns a new instance of Facet.



5
6
7
8
9
10
# File 'public/app/models/facet.rb', line 5

def initialize(type, key, count)
  self.type = type
  self.key = key
  self.count = count
  self.label = self.class.get_pretty_facet_value(self.type, self.key)
end

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



1
2
3
# File 'public/app/models/facet.rb', line 1

def count
  @count
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



1
2
3
# File 'public/app/models/facet.rb', line 1

def key
  @key
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



1
2
3
# File 'public/app/models/facet.rb', line 1

def label
  @label
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



1
2
3
# File 'public/app/models/facet.rb', line 1

def type
  @type
end