Class: ReVIEW::Book::Index::Item
- Defined in:
- lib/review/book/index/item.rb
Instance Attribute Summary collapse
-
#caption ⇒ Object
(also: #content)
readonly
Returns the value of attribute caption.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#index ⇒ Object
internal use only.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(id, number, caption = nil) ⇒ Item
constructor
A new instance of Item.
- #path ⇒ Object
Constructor Details
#initialize(id, number, caption = nil) ⇒ Item
Returns a new instance of Item.
19 20 21 22 23 24 25 |
# File 'lib/review/book/index/item.rb', line 19 def initialize(id, number, = nil) @id = id @number = number @caption = @path = nil @index = nil end |
Instance Attribute Details
#caption ⇒ Object (readonly) Also known as: content
Returns the value of attribute caption.
29 30 31 |
# File 'lib/review/book/index/item.rb', line 29 def @caption end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
27 28 29 |
# File 'lib/review/book/index/item.rb', line 27 def id @id end |
#index ⇒ Object
internal use only
30 31 32 |
# File 'lib/review/book/index/item.rb', line 30 def index @index end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
28 29 30 |
# File 'lib/review/book/index/item.rb', line 28 def number @number end |
Instance Method Details
#path ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/review/book/index/item.rb', line 34 def path if @path return @path end @path = @index.find_path(@id) @path end |