Class: Tlux::Pane
- Inherits:
-
Object
- Object
- Tlux::Pane
- Includes:
- Commandable, Splitable
- Defined in:
- lib/tlux/pane.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#percentage ⇒ Object
readonly
Returns the value of attribute percentage.
Instance Method Summary collapse
-
#initialize(orientation = :vertical, opts = {}) ⇒ Pane
constructor
A new instance of Pane.
- #orientation ⇒ Object
- #size ⇒ Object
Methods included from Commandable
#command, #commands, #directory
Methods included from Splitable
Constructor Details
#initialize(orientation = :vertical, opts = {}) ⇒ Pane
Returns a new instance of Pane.
8 9 10 11 12 |
# File 'lib/tlux/pane.rb', line 8 def initialize(orientation = :vertical, opts = {}) @orientation = orientation @lines = opts[:lines] @percentage = opts[:percentage] end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
6 7 8 |
# File 'lib/tlux/pane.rb', line 6 def lines @lines end |
#percentage ⇒ Object (readonly)
Returns the value of attribute percentage.
6 7 8 |
# File 'lib/tlux/pane.rb', line 6 def percentage @percentage end |
Instance Method Details
#orientation ⇒ Object
14 15 16 |
# File 'lib/tlux/pane.rb', line 14 def orientation "-#{@orientation.to_s.chars.first}" end |
#size ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/tlux/pane.rb', line 18 def size if lines "-l #{lines}" elsif percentage "-p #{percentage}" end end |