Class: Middleman::Sitemap::Extensions::ProxyDescriptor
- Inherits:
-
Struct
- Object
- Struct
- Middleman::Sitemap::Extensions::ProxyDescriptor
- Defined in:
- lib/middleman-core/sitemap/extensions/proxies.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#path ⇒ Object
Returns the value of attribute path.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata
34 35 36 |
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 34 def @metadata end |
#path ⇒ Object
Returns the value of attribute path
34 35 36 |
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 34 def path @path end |
#target ⇒ Object
Returns the value of attribute target
34 35 36 |
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 34 def target @target end |
Instance Method Details
#execute_descriptor(app, resources) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/middleman-core/sitemap/extensions/proxies.rb', line 35 def execute_descriptor(app, resources) md = .dup should_ignore = md.delete(:ignore) page_data = md.delete(:data) || {} page_data[:id] = md.delete(:id) if md.key?(:id) r = ProxyResource.new(app.sitemap, path, target) r.( locals: md.delete(:locals) || {}, page: page_data || {}, options: md ) if should_ignore d = ::Middleman::Sitemap::Extensions::Ignores::IgnoreDescriptor.new(target) d.execute_descriptor(app, resources) end resources + [r] end |