Class: ReVIEW::Book::ImageIndex::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/review/book/index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, number) ⇒ Item

Returns a new instance of Item.



136
137
138
139
140
# File 'lib/review/book/index.rb', line 136

def initialize(id, number)
  @id = id
  @number = number
  @path = nil
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



142
143
144
# File 'lib/review/book/index.rb', line 142

def id
  @id
end

#index=(value) ⇒ Object (writeonly)

internal use only



144
145
146
# File 'lib/review/book/index.rb', line 144

def index=(value)
  @index = value
end

#numberObject (readonly)

Returns the value of attribute number.



143
144
145
# File 'lib/review/book/index.rb', line 143

def number
  @number
end

Instance Method Details

#bound?Boolean

Returns:

  • (Boolean)


146
147
148
# File 'lib/review/book/index.rb', line 146

def bound?
  path
end

#pathObject



150
151
152
# File 'lib/review/book/index.rb', line 150

def path
  @path ||= @index.find_path(id)
end