Class: Middleman::Sitemap::Extensions::EndpointResource

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

Constant Summary

Constants inherited from Resource

Resource::FILTER, Resource::MAYBE_METADATA_CONTRACT, Resource::METADATA_CONTRACT

Constants included from Contracts

Contracts::ImmutableSetOf, Contracts::ImmutableSortedSetOf, Contracts::OldResourceList, Contracts::PATH_MATCHER, Contracts::ResourceList, Contracts::VectorOf

Instance Attribute Summary collapse

Attributes inherited from Resource

#app, #destination_path, #file_descriptor, #path, #priority, #vertices

Instance Method Summary collapse

Methods inherited from Resource

#<=>, #Any, #Bool, #Hash, #String, #add_filter, #add_metadata, #add_metadata_locals, #add_metadata_options, #add_metadata_page, #binary?, #content_type, #data, #ext, #ignore!, #locals, #metadata, #normalized_path, #options, #page, #page_id, #proxy_to, #render_without_filters, #source_file, #static_file?, #to_s, #url

Methods included from Traversal

#children, #directory_index?, #eponymous_directory?, #eponymous_directory_path, #parent, #parent_helper, #siblings, #traversal_root

Methods included from Contracts

#Contract

Constructor Details

#initialize(store, path, request_path) ⇒ EndpointResource

Returns a new instance of EndpointResource


42
43
44
45
# File 'middleman-core/lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 42

def initialize(store, path, request_path)
  super(store, path)
  @request_path = ::Middleman::Util.normalize_path(request_path)
end

Instance Attribute Details

#outputObject

Returns the value of attribute output


40
41
42
# File 'middleman-core/lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 40

def output
  @output
end

#request_pathObject (readonly)

Returns the value of attribute request_path


48
49
50
# File 'middleman-core/lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 48

def request_path
  @request_path
end

Instance Method Details

#ignored?Boolean

Returns:

  • (Boolean)

61
62
63
# File 'middleman-core/lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 61

def ignored?
  false
end

#renderObject


56
57
58
# File 'middleman-core/lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 56

def render(*)
  return output.call if output
end

#template?Boolean

Returns:

  • (Boolean)

51
52
53
# File 'middleman-core/lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 51

def template?
  true
end