Class: ReVIEW::Book::ImageIndex::Item
- Defined in:
- lib/review/book/index.rb
Direct Known Subclasses
ReVIEW::Book::IndepImageIndex::Item, NumberlessImageIndex::Item
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#index ⇒ Object
writeonly
internal use only.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
- #bound? ⇒ Boolean
-
#initialize(id, number) ⇒ Item
constructor
A new instance of Item.
- #path ⇒ Object
- #pathes ⇒ Object
Constructor Details
#initialize(id, number) ⇒ Item
Returns a new instance of Item.
135 136 137 138 139 |
# File 'lib/review/book/index.rb', line 135 def initialize(id, number) @id = id @number = number @pathes = nil end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
141 142 143 |
# File 'lib/review/book/index.rb', line 141 def id @id end |
#index=(value) ⇒ Object (writeonly)
internal use only
143 144 145 |
# File 'lib/review/book/index.rb', line 143 def index=(value) @index = value end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
142 143 144 |
# File 'lib/review/book/index.rb', line 142 def number @number end |
Instance Method Details
#bound? ⇒ Boolean
145 146 147 |
# File 'lib/review/book/index.rb', line 145 def bound? not pathes().empty? end |
#path ⇒ Object
149 150 151 |
# File 'lib/review/book/index.rb', line 149 def path pathes().first end |
#pathes ⇒ Object
153 154 155 |
# File 'lib/review/book/index.rb', line 153 def pathes @pathes ||= @index.find_pathes(id) end |