Class: ODDB::Html::State::Drugs::Feedback::Feedbackable
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ODDB::Html::State::Drugs::Feedback::Feedbackable
- Defined in:
- lib/oddb/html/state/drugs/feedback.rb
Constant Summary collapse
- INDEX_STEP =
10
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#index ⇒ Object
Returns the value of attribute index.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
Instance Method Summary collapse
- #created? ⇒ Boolean
-
#initialize(item) ⇒ Feedbackable
constructor
A new instance of Feedbackable.
Constructor Details
#initialize(item) ⇒ Feedbackable
Returns a new instance of Feedbackable.
20 21 22 23 24 25 |
# File 'lib/oddb/html/state/drugs/feedback.rb', line 20 def initialize(item) @item = item @index = 0 @current = ODDB::Util::Feedback.new super end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
19 20 21 |
# File 'lib/oddb/html/state/drugs/feedback.rb', line 19 def current @current end |
#index ⇒ Object
Returns the value of attribute index.
18 19 20 |
# File 'lib/oddb/html/state/drugs/feedback.rb', line 18 def index @index end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
19 20 21 |
# File 'lib/oddb/html/state/drugs/feedback.rb', line 19 def item @item end |
Instance Method Details
#created? ⇒ Boolean
26 27 28 |
# File 'lib/oddb/html/state/drugs/feedback.rb', line 26 def created? @item.feedbacks.include? @current end |