Class: Bookbinder::Subnav::PdfConfigCreator
- Inherits:
-
Object
- Object
- Bookbinder::Subnav::PdfConfigCreator
- Defined in:
- lib/bookbinder/subnav/pdf_config_creator.rb
Instance Attribute Summary collapse
-
#fs ⇒ Object
readonly
Returns the value of attribute fs.
-
#output_locations ⇒ Object
readonly
Returns the value of attribute output_locations.
Instance Method Summary collapse
- #create(navigation_entries, subnav_config) ⇒ Object
-
#initialize(fs, output_locations) ⇒ PdfConfigCreator
constructor
A new instance of PdfConfigCreator.
Constructor Details
#initialize(fs, output_locations) ⇒ PdfConfigCreator
Returns a new instance of PdfConfigCreator.
6 7 8 9 |
# File 'lib/bookbinder/subnav/pdf_config_creator.rb', line 6 def initialize(fs, output_locations) @fs = fs @output_locations = output_locations end |
Instance Attribute Details
#fs ⇒ Object (readonly)
Returns the value of attribute fs.
18 19 20 |
# File 'lib/bookbinder/subnav/pdf_config_creator.rb', line 18 def fs @fs end |
#output_locations ⇒ Object (readonly)
Returns the value of attribute output_locations.
18 19 20 |
# File 'lib/bookbinder/subnav/pdf_config_creator.rb', line 18 def output_locations @output_locations end |
Instance Method Details
#create(navigation_entries, subnav_config) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/bookbinder/subnav/pdf_config_creator.rb', line 11 def create(, ) @links = format_links() fs.overwrite(to: output_locations.pdf_config_dir.join(.pdf_config), text: config_content) end |