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 = []) ⇒ 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.
218 219 220 221 222 223 224 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 218 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.
213 214 215 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 213 def filename @filename end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
216 217 218 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 216 def output @output end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
215 216 217 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 215 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
214 215 216 |
# File 'lib/cosmos/tools/handbook_creator/handbook_creator_config.rb', line 214 def type @type end |