Class: FileComposer::Blueprint
- Inherits:
-
Object
- Object
- FileComposer::Blueprint
- Defined in:
- lib/file_composer/blueprint.rb
Overview
The main object model.
Instance Attribute Summary collapse
-
#documents ⇒ Object
readonly
Returns the value of attribute documents.
Instance Method Summary collapse
-
#initialize(documents: []) ⇒ Blueprint
constructor
A new instance of Blueprint.
- #write!(temp_root = '', store = Stores::Null.new) ⇒ Object
Constructor Details
#initialize(documents: []) ⇒ Blueprint
Returns a new instance of Blueprint.
20 21 22 23 24 25 26 |
# File 'lib/file_composer/blueprint.rb', line 20 def initialize(documents: []) @documents = Documents.array(documents) filenames = @documents.map { |a| a.filename.downcase } not_unique = filenames.uniq.length != @documents.length raise ArgumentError, "filenames not unique: #{filenames}" if not_unique end |
Instance Attribute Details
#documents ⇒ Object (readonly)
Returns the value of attribute documents.
18 19 20 |
# File 'lib/file_composer/blueprint.rb', line 18 def documents @documents end |