Module: DirModel::Export
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/dir_model/export.rb,
lib/dir_model/export/files.rb,
lib/dir_model/export/aggregate_dir.rb
Defined Under Namespace
Modules: Files Classes: AggregateDir
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#source_model ⇒ Object
readonly
Returns the value of attribute source_model.
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
11 12 13 |
# File 'lib/dir_model/export.rb', line 11 def context @context end |
#source_model ⇒ Object (readonly)
Returns the value of attribute source_model.
11 12 13 |
# File 'lib/dir_model/export.rb', line 11 def source_model @source_model end |
Instance Method Details
#initialize(source_model, context = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/dir_model/export.rb', line 15 def initialize(source_model, context={}) @source_model = source_model @context = OpenStruct.new(context) @root_path = Dir.mktmpdir end |
#path ⇒ Object
21 22 23 24 |
# File 'lib/dir_model/export.rb', line 21 def path generate unless generated? @root_path end |