class Flico::Cell
Attributes
height[R]
width[R]
x[R]
y[R]
Public Class Methods
new(x=0, y=0, width, height)
click to toggle source
# File lib/flico/cell.rb, line 6 def initialize(x=0, y=0, width, height) @x, @y = x, y @width, @height = width, height end
Public Instance Methods
==(o)
click to toggle source
# File lib/flico/cell.rb, line 19 def ==(o) o.class == self.class && o.state == state end
aspect_ratio()
click to toggle source
# File lib/flico/cell.rb, line 11 def aspect_ratio width.to_f / height.to_f end
to_mm()
click to toggle source
# File lib/flico/cell.rb, line 15 def to_mm "#{width}x#{height}+#{x}+#{y}" end
Protected Instance Methods
state()
click to toggle source
# File lib/flico/cell.rb, line 25 def state [@x, @y, @width, @height] end