Class: ReadingList::App
- Inherits:
-
Object
- Object
- ReadingList::App
- Defined in:
- lib/reading_list.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
Instance Method Summary collapse
-
#initialize(config_file) ⇒ App
constructor
A new instance of App.
- #run ⇒ Object
Constructor Details
#initialize(config_file) ⇒ App
Returns a new instance of App.
14 15 16 |
# File 'lib/reading_list.rb', line 14 def initialize(config_file) @container = IocContainer.new(config_file).container end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
18 19 20 |
# File 'lib/reading_list.rb', line 18 def container @container end |
Instance Method Details
#run ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/reading_list.rb', line 20 def run config = container.resolve(:configuration) output = render_template(config) write_template(config, output) end |