Class: Middleman::Sitemap::Extensions::MoveFile

Inherits:
ConfigExtension show all
Defined in:
middleman-core/lib/middleman-core/sitemap/extensions/move_file.rb

Overview

Manages the list of proxy configurations and manipulates the sitemap to include new resources based on those configurations

Defined Under Namespace

Classes: MoveFileDescriptor

Constant Summary

Constants included from Contracts

Contracts::PATH_MATCHER, Contracts::ResourceList, Contracts::VectorOf

Instance Attribute Summary

Attributes inherited from Extension

#app, #options

Instance Method Summary collapse

Methods inherited from ConfigExtension

#after_configuration, #initialize, #manipulate_resource_list, #proxy_method_call, #ready

Methods inherited from Extension

activated_extension, #add_exposed_to_context, #after_build, #after_configuration, after_extension_activated, #after_extension_activated, #before_build, #before_configuration, clear_after_extension_callbacks, config, define_setting, expose_to_application, expose_to_config, expose_to_template, global_config, helpers, #initialize, #manipulate_resource_list, option, #ready, resources

Methods included from Contracts

#Contract

Constructor Details

This class inherits a constructor from Middleman::ConfigExtension

Instance Method Details

#move_file(from, to) ⇒ Object



30
31
32
33
34
35
# File 'middleman-core/lib/middleman-core/sitemap/extensions/move_file.rb', line 30

def move_file(from, to)
  MoveFileDescriptor.new(
    ::Middleman::Util.normalize_path(from),
    ::Middleman::Util.normalize_path(to)
  )
end

#String

This method returns an undefined value.

Setup a move from one path to another

Parameters:

  • from (String)

    The original path.

  • to (String)

    The new path.



29
# File 'middleman-core/lib/middleman-core/sitemap/extensions/move_file.rb', line 29

Contract String, String => MoveFileDescriptor