Class: Rtml::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
# File 'lib/rtml/configuration.rb', line 8

def initialize
  self.widget_paths = default_widget_paths
  self.rtml_helper_paths = default_rtml_helper_paths
  self.widget_logging_enabled = default_widget_logging_enabled
  self.log_tml = default_log_tml
end

Instance Attribute Details

#log_tmlObject

Returns the value of attribute log_tml.



6
7
8
# File 'lib/rtml/configuration.rb', line 6

def log_tml
  @log_tml
end

#rtml_helper_pathsObject

Returns the value of attribute rtml_helper_paths.



4
5
6
# File 'lib/rtml/configuration.rb', line 4

def rtml_helper_paths
  @rtml_helper_paths
end

#widget_logging_enabledObject

Returns the value of attribute widget_logging_enabled.



5
6
7
# File 'lib/rtml/configuration.rb', line 5

def widget_logging_enabled
  @widget_logging_enabled
end

#widget_pathsObject

Returns the value of attribute widget_paths.



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

def widget_paths
  @widget_paths
end

Instance Method Details

#validate!Object

does some basic manipulation to options in order to guesstimate the correct values for erroneous configurations



16
17
18
19
20
21
# File 'lib/rtml/configuration.rb', line 16

def validate!
  widget_paths.flatten!
  widget_paths.uniq!
  rtml_helper_paths.flatten!
  rtml_helper_paths.uniq!
end