Class: RubyJard::Layout
- Inherits:
-
Object
- Object
- RubyJard::Layout
- Defined in:
- lib/ruby_jard/layout.rb
Overview
Data object to store calculated layout
Instance Attribute Summary collapse
-
#box_height ⇒ Object
Returns the value of attribute box_height.
-
#box_width ⇒ Object
Returns the value of attribute box_width.
-
#box_x ⇒ Object
Returns the value of attribute box_x.
-
#box_y ⇒ Object
Returns the value of attribute box_y.
-
#height ⇒ Object
Returns the value of attribute height.
-
#parent_template ⇒ Object
Returns the value of attribute parent_template.
-
#template ⇒ Object
Returns the value of attribute template.
-
#width ⇒ Object
Returns the value of attribute width.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(template: nil, parent_template: nil, width: 0, height: 0, x: 0, y: 0, box_width: 0, box_height: 0, box_x: 0, box_y: 0) ⇒ Layout
constructor
A new instance of Layout.
Constructor Details
#initialize(template: nil, parent_template: nil, width: 0, height: 0, x: 0, y: 0, box_width: 0, box_height: 0, box_x: 0, box_y: 0) ⇒ Layout
Returns a new instance of Layout.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruby_jard/layout.rb', line 11 def initialize( template: nil, parent_template: nil, width: 0, height: 0, x: 0, y: 0, box_width: 0, box_height: 0, box_x: 0, box_y: 0 ) @template = template @box_width = box_width @box_height = box_height @box_x = box_x @box_y = box_y @width = width @height = height @x = x @y = y @parent_template = parent_template end |
Instance Attribute Details
#box_height ⇒ Object
Returns the value of attribute box_height.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def box_height @box_height end |
#box_width ⇒ Object
Returns the value of attribute box_width.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def box_width @box_width end |
#box_x ⇒ Object
Returns the value of attribute box_x.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def box_x @box_x end |
#box_y ⇒ Object
Returns the value of attribute box_y.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def box_y @box_y end |
#height ⇒ Object
Returns the value of attribute height.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def height @height end |
#parent_template ⇒ Object
Returns the value of attribute parent_template.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def parent_template @parent_template end |
#template ⇒ Object
Returns the value of attribute template.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def template @template end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def width @width end |
#x ⇒ Object
Returns the value of attribute x.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
7 8 9 |
# File 'lib/ruby_jard/layout.rb', line 7 def y @y end |