Class: Middleman::Sitemap::Extensions::RequestEndpoints::EndpointDescriptor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block


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

def block
  @block
end

#pathObject

Returns the value of attribute path


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

def path
  @path
end

#request_pathObject

Returns the value of attribute request_path


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

def request_path
  @request_path
end

Instance Method Details

#execute_descriptor(app, resource_list) ⇒ Object


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

def execute_descriptor(app, resource_list)
  r = EndpointResource.new(
    app.sitemap,
    path,
    request_path
  )
  r.output = block if block

  resource_list.add! r
end