Class: RubyJard::Templates::LayoutTemplate
- Inherits:
-
Object
- Object
- RubyJard::Templates::LayoutTemplate
- Defined in:
- lib/ruby_jard/templates/layout_template.rb
Overview
Template of a layout. Templates are hierarchy. Each template includes the sizing configuration, including absolute values, min, max, or ratio relative to its parant.
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#fill_height ⇒ Object
readonly
Returns the value of attribute fill_height.
-
#fill_width ⇒ Object
readonly
Returns the value of attribute fill_width.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#height_ratio ⇒ Object
readonly
Returns the value of attribute height_ratio.
-
#min_height ⇒ Object
readonly
Returns the value of attribute min_height.
-
#min_width ⇒ Object
readonly
Returns the value of attribute min_width.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
-
#width_ratio ⇒ Object
readonly
Returns the value of attribute width_ratio.
Instance Method Summary collapse
-
#initialize(height_ratio: nil, width_ratio: nil, min_width: nil, min_height: nil, height: nil, width: nil, children: [], fill_width: true, fill_height: true) ⇒ LayoutTemplate
constructor
A new instance of LayoutTemplate.
Constructor Details
#initialize(height_ratio: nil, width_ratio: nil, min_width: nil, min_height: nil, height: nil, width: nil, children: [], fill_width: true, fill_height: true) ⇒ LayoutTemplate
Returns a new instance of LayoutTemplate.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 16 def initialize( height_ratio: nil, width_ratio: nil, min_width: nil, min_height: nil, height: nil, width: nil, children: [], fill_width: true, fill_height: true ) @height_ratio = height_ratio @width_ratio = width_ratio @min_width = min_width @min_height = min_height @height = height @width = width @children = children @fill_width = fill_width @fill_height = fill_height end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def children @children end |
#fill_height ⇒ Object (readonly)
Returns the value of attribute fill_height.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def fill_height @fill_height end |
#fill_width ⇒ Object (readonly)
Returns the value of attribute fill_width.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def fill_width @fill_width end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def height @height end |
#height_ratio ⇒ Object (readonly)
Returns the value of attribute height_ratio.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def height_ratio @height_ratio end |
#min_height ⇒ Object (readonly)
Returns the value of attribute min_height.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def min_height @min_height end |
#min_width ⇒ Object (readonly)
Returns the value of attribute min_width.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def min_width @min_width end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def width @width end |
#width_ratio ⇒ Object (readonly)
Returns the value of attribute width_ratio.
10 11 12 |
# File 'lib/ruby_jard/templates/layout_template.rb', line 10 def width_ratio @width_ratio end |