Class: ODDB::Html::State::Drugs::Feedback::Feedbackable

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/oddb/html/state/drugs/feedback.rb

Constant Summary collapse

INDEX_STEP =
10

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#currentObject (readonly)

Returns the value of attribute current.



19
20
21
# File 'lib/oddb/html/state/drugs/feedback.rb', line 19

def current
  @current
end

#indexObject

Returns the value of attribute index.



18
19
20
# File 'lib/oddb/html/state/drugs/feedback.rb', line 18

def index
  @index
end

#itemObject (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

Returns:

  • (Boolean)


26
27
28
# File 'lib/oddb/html/state/drugs/feedback.rb', line 26

def created?
  @item.feedbacks.include? @current
end