Class: Fictium::Document
Instance Attribute Summary collapse
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
- #create_resource ⇒ Object
- #export ⇒ Object
-
#initialize ⇒ Document
constructor
A new instance of Document.
Methods inherited from Model
Constructor Details
#initialize ⇒ Document
Returns a new instance of Document.
5 6 7 |
# File 'lib/fictium/poros/document.rb', line 5 def initialize @resources = [] end |
Instance Attribute Details
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
3 4 5 |
# File 'lib/fictium/poros/document.rb', line 3 def resources @resources end |
Instance Method Details
#create_resource ⇒ Object
9 10 11 |
# File 'lib/fictium/poros/document.rb', line 9 def create_resource Fictium::Resource.new(self).tap { |resource| resources << resource } end |
#export ⇒ Object
13 14 15 16 17 |
# File 'lib/fictium/poros/document.rb', line 13 def export Fictium.configuration.exporters.each do |exporter| exporter.export(self) end end |