Class: Reparty::Config

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/reparty/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



7
8
9
10
11
# File 'lib/reparty/config.rb', line 7

def initialize
  @reports = []
  @weekly_reports = []
  super
end

Instance Attribute Details

#reportsObject (readonly)

Returns the value of attribute reports.



5
6
7
# File 'lib/reparty/config.rb', line 5

def reports
  @reports
end

#weekly_reportsObject (readonly)

Returns the value of attribute weekly_reports.



5
6
7
# File 'lib/reparty/config.rb', line 5

def weekly_reports
  @weekly_reports
end

Instance Method Details

#add_report(report, *args, &block) ⇒ Object



13
14
15
# File 'lib/reparty/config.rb', line 13

def add_report(report, *args, &block)
  @reports << report.new(1, *args, &block)
end

#add_weekly_report(report, *args, &block) ⇒ Object



17
18
19
# File 'lib/reparty/config.rb', line 17

def add_weekly_report(report, *args, &block)
  @weekly_reports << report.new(7, *args, &block)
end