Class: OPDS::Support::Facet
- Defined in:
- lib/opds/support/linkset.rb
Instance Attribute Summary
Attributes inherited from Link
Instance Method Summary collapse
-
#active_facet ⇒ Boolean
(also: #active_facet?)
Is that facet active.
-
#count ⇒ Integer
Approximate number of entries yield by this facet.
-
#facet_group ⇒ String
Facet group.
-
#initialize(array, browser = OPDS::Support::Browser.new) ⇒ Facet
constructor
A new instance of Facet.
Methods inherited from Link
#currency, #inspect, #navigate, #price, #rel, #title, #type, #url
Methods included from Logging
Constructor Details
#initialize(array, browser = OPDS::Support::Browser.new) ⇒ Facet
Returns a new instance of Facet.
64 65 66 |
# File 'lib/opds/support/linkset.rb', line 64 def initialize(array,browser=OPDS::Support::Browser.new) super(array,browser) end |
Instance Method Details
#active_facet ⇒ Boolean Also known as: active_facet?
Returns is that facet active.
74 75 76 |
# File 'lib/opds/support/linkset.rb', line 74 def active_facet !self[7].nil? end |
#count ⇒ Integer
Returns approximate number of entries yield by this facet.
81 82 83 |
# File 'lib/opds/support/linkset.rb', line 81 def count self[8].to_i end |
#facet_group ⇒ String
Returns facet group.
69 70 71 |
# File 'lib/opds/support/linkset.rb', line 69 def facet_group self[6] end |