Class: Layouter::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/layouter/element.rb

Direct Known Subclasses

Leaf::Base, Parent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeElement

Returns a new instance of Element.



6
7
8
# File 'lib/layouter/element.rb', line 6

def initialize
  @calculated_width = @calculated_height = nil
end

Instance Attribute Details

#calculated_heightObject (readonly)

Returns the value of attribute calculated_height.



4
5
6
# File 'lib/layouter/element.rb', line 4

def calculated_height
  @calculated_height
end

#calculated_widthObject (readonly)

Returns the value of attribute calculated_width.



4
5
6
# File 'lib/layouter/element.rb', line 4

def calculated_width
  @calculated_width
end

Instance Method Details

#layout?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/layouter/element.rb', line 19

def layout?
  !!@calculated_width && !!@calculated_height
end