Class: Ranker::Strategies::Strategy
- Inherits:
-
Object
- Object
- Ranker::Strategies::Strategy
- Defined in:
- lib/ranker/strategies/strategy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#rankables ⇒ Object
readonly
Returns the value of attribute rankables.
Instance Method Summary collapse
-
#initialize(rankables, *args) ⇒ Strategy
constructor
A new instance of Strategy.
- #rank ⇒ Object
-
#rankings ⇒ Object
Properties:.
Constructor Details
#initialize(rankables, *args) ⇒ Strategy
Returns a new instance of Strategy.
7 8 9 10 11 12 13 14 15 |
# File 'lib/ranker/strategies/strategy.rb', line 7 def initialize(rankables, *args) @rankables = rankables = args.pop if && .kind_of?(Hash) @options = .merge() else @options = end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/ranker/strategies/strategy.rb', line 5 def @options end |
#rankables ⇒ Object (readonly)
Returns the value of attribute rankables.
5 6 7 |
# File 'lib/ranker/strategies/strategy.rb', line 5 def rankables @rankables end |