class ONIX::Extent
Public Instance Methods
bytes()
click to toggle source
bytes count @return [Integer]
# File lib/onix/extent.rb, line 15 def bytes case @extent_unit.human when "Bytes" @extent_value.to_i when "Kbytes" (@extent_value.to_f * 1024).to_i when "Mbytes" (@extent_value.to_f * 1024 * 1024).to_i else nil end end
pages()
click to toggle source
pages count @return [Integer]
# File lib/onix/extent.rb, line 30 def pages if @extent_unit.human == "Pages" @extent_value.to_i else nil end end