Class: RubyScreen::Configuration::Description

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_screen/configuration/description.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDescription

Returns a new instance of Description.



5
6
7
8
9
# File 'lib/ruby_screen/configuration/description.rb', line 5

def initialize
  @customizations = {}
  @numberless_windows = []
  @numbered_windows = {}
end

Instance Attribute Details

#customizationsObject (readonly)

Returns the value of attribute customizations.



3
4
5
# File 'lib/ruby_screen/configuration/description.rb', line 3

def customizations
  @customizations
end

#numbered_windowsObject (readonly)

Returns the value of attribute numbered_windows.



3
4
5
# File 'lib/ruby_screen/configuration/description.rb', line 3

def numbered_windows
  @numbered_windows
end

#numberless_windowsObject (readonly)

Returns the value of attribute numberless_windows.



3
4
5
# File 'lib/ruby_screen/configuration/description.rb', line 3

def numberless_windows
  @numberless_windows
end

#working_directoryObject

Returns the value of attribute working_directory.



3
4
5
# File 'lib/ruby_screen/configuration/description.rb', line 3

def working_directory
  @working_directory
end

Instance Method Details

#add_customization(key, value) ⇒ Object



20
21
22
# File 'lib/ruby_screen/configuration/description.rb', line 20

def add_customization(key, value)
  @customizations.store(key, value)
end

#add_window(options) ⇒ Object



24
25
26
# File 'lib/ruby_screen/configuration/description.rb', line 24

def add_window(options)
  options.include?("number") ? add_numbered_window(options) : add_numberless_window(options)
end

#append_directory(directory) ⇒ Object



16
17
18
# File 'lib/ruby_screen/configuration/description.rb', line 16

def append_directory(directory)
  process_directory(directory, @working_directory)
end

#to_screen_configurationObject



28
29
30
# File 'lib/ruby_screen/configuration/description.rb', line 28

def to_screen_configuration
  Generator.new(self).to_screen_configuration
end