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

Inherits:
Struct
  • Object
show all
Defined in:
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

Returns:

  • (Object)

    the current value of block



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

def block
  @block
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



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

def path
  @path
end

#request_pathObject

Returns the value of attribute request_path

Returns:

  • (Object)

    the current value of request_path



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

def request_path
  @request_path
end

Instance Method Details

#execute_descriptor(app, resources) ⇒ Object



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

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

  resources + [r]
end