Class: Roebe::Shell::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/roebe/shell/configuration/configuration.rb

Overview

Roebe::Shell::Configuration

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

#

initialize

#


31
32
# File 'lib/roebe/shell/configuration/configuration.rb', line 31

def initialize
end

Instance Method Details

#load_configuration_from_this_file(i) ⇒ Object

#

load_configuration_from_this_file

This method can be used to load a rc-file, as the main configuration file for the roebe-shell component.

#


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/roebe/shell/configuration/configuration.rb', line 40

def load_configuration_from_this_file(i)
  if File.exist? i
    dataset = File.readlines(i)
    dataset.each {|line|
      if line.include? ':'
        splitted = line.split(':')
        first    = splitted.first
        last     = splitted.last
        case first
        # ================================================================= #
        # === use_colours
        # ================================================================= #
        when 'use_colours'
          ::Roebe::Shell.set_use_colours(last)
        end
      end
    }
  end
end