Class: Tlux::Session
- Inherits:
-
Object
- Object
- Tlux::Session
- Defined in:
- lib/tlux/session.rb
Instance Attribute Summary collapse
-
#windows ⇒ Object
readonly
Returns the value of attribute windows.
Instance Method Summary collapse
- #dir(val = nil) ⇒ Object
- #get_binding ⇒ Object
-
#initialize(name = "") ⇒ Session
constructor
A new instance of Session.
- #name(val = nil) ⇒ Object
- #window(name, opts = {}, &block) ⇒ Object
Constructor Details
#initialize(name = "") ⇒ Session
Returns a new instance of Session.
5 6 7 8 9 |
# File 'lib/tlux/session.rb', line 5 def initialize(name = "") @name = name @dir = Dir.pwd @windows = [] end |
Instance Attribute Details
#windows ⇒ Object (readonly)
Returns the value of attribute windows.
3 4 5 |
# File 'lib/tlux/session.rb', line 3 def windows @windows end |
Instance Method Details
#dir(val = nil) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/tlux/session.rb', line 25 def dir(val = nil) if val.nil? @dir else @dir = val end end |
#get_binding ⇒ Object
33 34 35 |
# File 'lib/tlux/session.rb', line 33 def get_binding binding end |
#name(val = nil) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/tlux/session.rb', line 17 def name(val = nil) if val.nil? @name.empty? ? name_from_dir : @name else @name = val end end |