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

Returns:

  • (Object)

    the current value of 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

Returns:

  • (Object)

    the current value of 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, resource_list) ⇒ Object



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

def execute_descriptor(app, resource_list)
  source = ::Middleman::SourceFile.new(Pathname(from).relative_path_from(app.source_dir), Pathname(from), app.source_dir, Set.new(%i[source binary]), 0)
  resource_list.add! ::Middleman::Sitemap::Resource.new(app.sitemap, to, source)
end