Class: C2eCore::Drops::OrderRatingDrop
- Defined in:
- /build/app/mailers/c2e_core/drops/order_rating_drop.rb
Instance Method Summary collapse
-
#initialize(rating_note) ⇒ OrderRatingDrop
constructor
A new instance of OrderRatingDrop.
-
#rating_type ⇒ String
-
Translated type of current rating.
-
-
#rating_type_code ⇒ String
-
Code of current rating.
-
-
#text ⇒ String
-
Text of current rating.
-
-
#value ⇒ Integer
-
Value of current rating.
-
Constructor Details
#initialize(rating_note) ⇒ OrderRatingDrop
Returns a new instance of OrderRatingDrop.
7 8 9 10 |
# File '/build/app/mailers/c2e_core/drops/order_rating_drop.rb', line 7 def initialize() super() @rating_note = end |
Instance Method Details
#rating_type ⇒ String
Returns - Translated type of current rating.
23 24 25 |
# File '/build/app/mailers/c2e_core/drops/order_rating_drop.rb', line 23 def @rating_note.note_type.to_s end |
#rating_type_code ⇒ String
Returns - Code of current rating. E.g.: “hodnocení - způsob doručení”.
28 29 30 |
# File '/build/app/mailers/c2e_core/drops/order_rating_drop.rb', line 28 def @rating_note.note_type.code end |
#text ⇒ String
Returns - Text of current rating. May be blank.
13 14 15 |
# File '/build/app/mailers/c2e_core/drops/order_rating_drop.rb', line 13 def text @rating_note.text end |
#value ⇒ Integer
Returns - Value of current rating. Possible values are from 0 to 5.
18 19 20 |
# File '/build/app/mailers/c2e_core/drops/order_rating_drop.rb', line 18 def value @rating_note.value.to_i / 10 end |