Class: Cosmos::HandbookCreatorConfig::Section
- Defined in:
- lib/cosmos/tools/handbook_creator/handbook_creator_config.rb
Overview
class Page
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #create(file, title, packets = [], ignored = {}) ⇒ Object
-
#initialize(output, filename, title, type = :NONE) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(output, filename, title, type = :NONE) ⇒ Section
Returns a new instance of Section.
240 241 242 243 244 245 246 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 240 def initialize(output, filename, title, type = :NONE) raise "Unknown output: #{output.to_s.upcase}" unless ['ALL', 'HTML', 'PDF'].include?(output.to_s.upcase) @output = output.to_s.upcase.intern @filename = File.join(USERPATH, 'config', 'tools', 'handbook_creator', 'templates', filename) @title = title @type = type end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
235 236 237 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 235 def filename @filename end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
238 239 240 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 238 def output @output end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
237 238 239 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 237 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
236 237 238 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 236 def type @type end |