Class: Echoes::PaneTree::SplitNode
- Inherits:
-
Object
- Object
- Echoes::PaneTree::SplitNode
- Defined in:
- lib/echoes/pane_tree.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#left ⇒ Object
Returns the value of attribute left.
-
#ratio ⇒ Object
Returns the value of attribute ratio.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(direction:, ratio: 0.5, left:, right:) ⇒ SplitNode
constructor
direction: :vertical (left/right split with vertical divider) :horizontal (top/bottom split with horizontal divider) ratio: 0.0..1.0, fraction allocated to left/top child.
Constructor Details
#initialize(direction:, ratio: 0.5, left:, right:) ⇒ SplitNode
direction: :vertical (left/right split with vertical divider)
:horizontal (top/bottom split with horizontal divider)
ratio: 0.0..1.0, fraction allocated to left/top child
11 12 13 14 15 16 |
# File 'lib/echoes/pane_tree.rb', line 11 def initialize(direction:, ratio: 0.5, left:, right:) @direction = direction @ratio = ratio @left = left @right = right end |
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction.
6 7 8 |
# File 'lib/echoes/pane_tree.rb', line 6 def direction @direction end |
#left ⇒ Object
Returns the value of attribute left.
6 7 8 |
# File 'lib/echoes/pane_tree.rb', line 6 def left @left end |
#ratio ⇒ Object
Returns the value of attribute ratio.
6 7 8 |
# File 'lib/echoes/pane_tree.rb', line 6 def ratio @ratio end |
#right ⇒ Object
Returns the value of attribute right.
6 7 8 |
# File 'lib/echoes/pane_tree.rb', line 6 def right @right end |