Class: Middleman::Sitemap::StringResource

Inherits:
Resource
  • Object
show all
Defined in:
middleman-core/lib/middleman-core/sitemap/resource.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

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, #content_type, #data, #ext, #ignore!, #ignored?, #locals, #metadata, #normalized_path, #options, #page, #page_id, #proxy_to, #render_without_filters, #source_file, #static_file?, #to_s, #url

Methods included from Extensions::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, contents) ⇒ StringResource

Returns a new instance of StringResource


353
354
355
356
357
# File 'middleman-core/lib/middleman-core/sitemap/resource.rb', line 353

def initialize(store, path, contents)
  @request_path = path
  @contents = contents
  super(store, path)
end

Instance Method Details

#binary?Boolean

Returns:

  • (Boolean)

367
368
369
# File 'middleman-core/lib/middleman-core/sitemap/resource.rb', line 367

def binary?
  false
end

#renderObject


363
364
365
# File 'middleman-core/lib/middleman-core/sitemap/resource.rb', line 363

def render(*)
  @contents
end

#template?Boolean

Returns:

  • (Boolean)

359
360
361
# File 'middleman-core/lib/middleman-core/sitemap/resource.rb', line 359

def template?
  true
end