Class: Bookwatch::Subnav::SubnavGenerator
- Inherits:
-
Object
- Object
- Bookwatch::Subnav::SubnavGenerator
- Defined in:
- lib/bookwatch/subnav/subnav_generator.rb
Instance Attribute Summary collapse
-
#navigation_entries_parser ⇒ Object
readonly
Returns the value of attribute navigation_entries_parser.
-
#pdf_config_creator ⇒ Object
readonly
Returns the value of attribute pdf_config_creator.
-
#template_creator ⇒ Object
readonly
Returns the value of attribute template_creator.
Instance Method Summary collapse
- #generate(subnav_spec) ⇒ Object
-
#initialize(navigation_entries_parser, template_creator, pdf_config_creator, output_locations) ⇒ SubnavGenerator
constructor
A new instance of SubnavGenerator.
Constructor Details
#initialize(navigation_entries_parser, template_creator, pdf_config_creator, output_locations) ⇒ SubnavGenerator
Returns a new instance of SubnavGenerator.
4 5 6 7 8 9 |
# File 'lib/bookwatch/subnav/subnav_generator.rb', line 4 def initialize(, template_creator, pdf_config_creator, output_locations) @navigation_entries_parser = @template_creator = template_creator @pdf_config_creator = pdf_config_creator @output_locations = output_locations end |
Instance Attribute Details
#navigation_entries_parser ⇒ Object (readonly)
Returns the value of attribute navigation_entries_parser.
17 18 19 |
# File 'lib/bookwatch/subnav/subnav_generator.rb', line 17 def @navigation_entries_parser end |
#pdf_config_creator ⇒ Object (readonly)
Returns the value of attribute pdf_config_creator.
17 18 19 |
# File 'lib/bookwatch/subnav/subnav_generator.rb', line 17 def pdf_config_creator @pdf_config_creator end |
#template_creator ⇒ Object (readonly)
Returns the value of attribute template_creator.
17 18 19 |
# File 'lib/bookwatch/subnav/subnav_generator.rb', line 17 def template_creator @template_creator end |
Instance Method Details
#generate(subnav_spec) ⇒ Object
11 12 13 14 15 |
# File 'lib/bookwatch/subnav/subnav_generator.rb', line 11 def generate() = .get_links(, output_locations) template_creator.create(, ) pdf_config_creator.create(, ) if pdf?() end |