Class: Architecture::Append
- Inherits:
-
Object
- Object
- Architecture::Append
- Includes:
- Contentable, Entityable
- Defined in:
- lib/architecture/append.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(source:, content: "", context: {}) ⇒ Append
constructor
A new instance of Append.
Constructor Details
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/architecture/append.rb', line 12 def call if entity.file? entity.write(text: data) else raise ArgumentError, "Source wasn't a file" end end |