Class: Middleman::Sitemap::Extensions::ProxyDescriptor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



74
75
76
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 74

def 
  @metadata
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



74
75
76
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 74

def path
  @path
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



74
75
76
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 74

def target
  @target
end

Instance Method Details

#to_resource(app) ⇒ Object



75
76
77
78
79
80
81
82
83
84
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 75

def to_resource(app)
  ProxyResource.new(app.sitemap, path, target).tap do |p|
    md = .dup
    p.(
      locals: md.delete(:locals) || {},
      page: md.delete(:data) || {},
      options: md
    )
  end
end