Class: Middleman::Sitemap::Extensions::EndpointResource
- Defined in:
- lib/middleman-core/sitemap/extensions/request_endpoints.rb
Constant Summary
Constants inherited from Resource
Constants included from Contracts
Instance Attribute Summary collapse
-
#output ⇒ Object
Returns the value of attribute output.
-
#request_path ⇒ Object
readonly
Returns the value of attribute request_path.
Attributes inherited from Resource
#destination_path, #file_descriptor, #ignored, #metadata, #path
Instance Method Summary collapse
- #ignored? ⇒ Boolean
-
#initialize(store, path, request_path) ⇒ EndpointResource
constructor
A new instance of EndpointResource.
- #render ⇒ Object
- #template? ⇒ Boolean
Methods inherited from Resource
#Any, #Bool, #Hash, #METADATA_HASH, #String, #add_metadata, #binary?, #content_type, #data, #ext, #ignore!, #indifferent_access?, #locals, #options, #page_id, #proxy_to, #source_file, #to_s, #url
Methods included from Traversal
#children, #directory_index?, #eponymous_directory?, #eponymous_directory_path, #parent, #siblings, #traversal_root
Methods included from Contracts
Constructor Details
#initialize(store, path, request_path) ⇒ EndpointResource
Returns a new instance of EndpointResource.
43 44 45 46 |
# File 'lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 43 def initialize(store, path, request_path) super(store, path) @request_path = ::Middleman::Util.normalize_path(request_path) end |
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
41 42 43 |
# File 'lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 41 def output @output end |
#request_path ⇒ Object (readonly)
Returns the value of attribute request_path.
49 50 51 |
# File 'lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 49 def request_path @request_path end |
Instance Method Details
#ignored? ⇒ Boolean
62 63 64 |
# File 'lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 62 def ignored? false end |
#render ⇒ Object
57 58 59 |
# File 'lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 57 def render(*) return output.call if output end |
#template? ⇒ Boolean
52 53 54 |
# File 'lib/middleman-core/sitemap/extensions/request_endpoints.rb', line 52 def template? true end |