Class: Statistrano::Config

Inherits:
Object
  • Object
show all
Includes:
RakeTaskWithContextCreation
Defined in:
lib/statistrano/config.rb,
lib/statistrano/config/configurable.rb,
lib/statistrano/config/rake_task_with_context_creation.rb

Defined Under Namespace

Modules: Configurable, RakeTaskWithContextCreation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RakeTaskWithContextCreation

included, #namespace, #task

Constructor Details

#initialize(options = nil, tasks = nil) ⇒ Config

initalize with the potential for seed options this is required so that when config’d classes are extended we can pass that configuration along



14
15
16
17
18
19
20
21
# File 'lib/statistrano/config.rb', line 14

def initialize options=nil, tasks=nil
  @options = options.nil? ? {} : options.clone
  @tasks   = tasks.nil?   ? {} : tasks.clone

  @options.each do |key,val|
    define_option_accessor key.to_sym
  end
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/statistrano/config.rb', line 8

def options
  @options
end

#tasksObject (readonly)

Returns the value of attribute tasks.



9
10
11
# File 'lib/statistrano/config.rb', line 9

def tasks
  @tasks
end