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.



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

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

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

Returns:

  • (Boolean)


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

def bound?
  not pathes().empty?
end

#pathObject



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

def path
  pathes().first
end

#pathesObject



153
154
155
# File 'lib/review/book/index.rb', line 153

def pathes
  @pathes ||= @index.find_pathes(id)
end