Class: Lateral::Recommendation
- Inherits:
-
Object
- Object
- Lateral::Recommendation
- Defined in:
- lib/lateral/recommendation.rb
Instance Attribute Summary collapse
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#document_id ⇒ Object
readonly
Returns the value of attribute document_id.
Instance Method Summary collapse
-
#initialize(args) ⇒ Recommendation
constructor
A new instance of Recommendation.
Constructor Details
#initialize(args) ⇒ Recommendation
Returns a new instance of Recommendation.
5 6 7 8 |
# File 'lib/lateral/recommendation.rb', line 5 def initialize(args) @document_id = args.fetch 'document_id' @distance = args.fetch 'distance' end |
Instance Attribute Details
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
3 4 5 |
# File 'lib/lateral/recommendation.rb', line 3 def distance @distance end |
#document_id ⇒ Object (readonly)
Returns the value of attribute document_id.
3 4 5 |
# File 'lib/lateral/recommendation.rb', line 3 def document_id @document_id end |