Class: Middleman::Sitemap::Extensions::Import::ImportFileDescriptor

Inherits:
Struct
  • Object
show all
Defined in:
middleman-core/lib/middleman-core/sitemap/extensions/import.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject

Returns the value of attribute from



13
14
15
# File 'middleman-core/lib/middleman-core/sitemap/extensions/import.rb', line 13

def from
  @from
end

#toObject

Returns the value of attribute to



13
14
15
# File 'middleman-core/lib/middleman-core/sitemap/extensions/import.rb', line 13

def to
  @to
end

Instance Method Details

#execute_descriptor(app, resources) ⇒ Object



14
15
16
17
18
19
20
# File 'middleman-core/lib/middleman-core/sitemap/extensions/import.rb', line 14

def execute_descriptor(app, resources)
  source = ::Middleman::SourceFile.new(Pathname(from).relative_path_from(app.source_dir), Pathname(from), app.source_dir, Set.new([:source, :binary]), 0)

  resources + [
    ::Middleman::Sitemap::Resource.new(app.sitemap, to, source)
  ]
end