Class: Bookbinder::Subnav::SubnavGenerator
- Inherits:
-
Object
- Object
- Bookbinder::Subnav::SubnavGenerator
- Defined in:
- lib/bookbinder/subnav/subnav_generator.rb
Instance Attribute Summary collapse
-
#json_props_creator ⇒ Object
readonly
Returns the value of attribute json_props_creator.
-
#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(json_props_creator, template_creator, pdf_config_creator) ⇒ SubnavGenerator
constructor
A new instance of SubnavGenerator.
Constructor Details
#initialize(json_props_creator, template_creator, pdf_config_creator) ⇒ SubnavGenerator
Returns a new instance of SubnavGenerator.
4 5 6 7 8 |
# File 'lib/bookbinder/subnav/subnav_generator.rb', line 4 def initialize(json_props_creator, template_creator, pdf_config_creator) @json_props_creator = json_props_creator @template_creator = template_creator @pdf_config_creator = pdf_config_creator end |
Instance Attribute Details
#json_props_creator ⇒ Object (readonly)
Returns the value of attribute json_props_creator.
16 17 18 |
# File 'lib/bookbinder/subnav/subnav_generator.rb', line 16 def json_props_creator @json_props_creator end |
#pdf_config_creator ⇒ Object (readonly)
Returns the value of attribute pdf_config_creator.
16 17 18 |
# File 'lib/bookbinder/subnav/subnav_generator.rb', line 16 def pdf_config_creator @pdf_config_creator end |
#template_creator ⇒ Object (readonly)
Returns the value of attribute template_creator.
16 17 18 |
# File 'lib/bookbinder/subnav/subnav_generator.rb', line 16 def template_creator @template_creator end |
Instance Method Details
#generate(subnav_spec) ⇒ Object
10 11 12 13 14 |
# File 'lib/bookbinder/subnav/subnav_generator.rb', line 10 def generate() filename = json_props_creator.create() template_creator.create(filename, ) pdf_config_creator.create(filename, ) if pdf?() end |