Class: Reparty::Config
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Reparty::Config
- Defined in:
- lib/reparty/config.rb
Instance Attribute Summary collapse
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
-
#weekly_reports ⇒ Object
readonly
Returns the value of attribute weekly_reports.
Instance Method Summary collapse
- #add_report(report, *args, &block) ⇒ Object
- #add_weekly_report(report, *args, &block) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
5 6 7 |
# File 'lib/reparty/config.rb', line 5 def reports @reports end |
#weekly_reports ⇒ Object (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 |