Class: Middleman::Sitemap::Extensions::Import
- Inherits:
-
ConfigExtension
- Object
- Extension
- ConfigExtension
- Middleman::Sitemap::Extensions::Import
- Defined in:
- lib/middleman-core/sitemap/extensions/import.rb
Defined Under Namespace
Classes: ImportFileDescriptor, ImportPathDescriptor
Constant Summary
Constants included from Contracts
Instance Attribute Summary
Attributes inherited from Extension
Instance Method Summary collapse
- #import_file(from, to) ⇒ Object
- #import_path(from, &block) ⇒ Object
-
#String
Import an external glob into
source
.
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
Constructor Details
This class inherits a constructor from Middleman::ConfigExtension
Instance Method Details
#import_file(from, to) ⇒ Object
44 45 46 47 48 49 |
# File 'lib/middleman-core/sitemap/extensions/import.rb', line 44 def import_file(from, to) ImportFileDescriptor.new( File.(from, @app.root), ::Middleman::Util.normalize_path(to) ) end |
#import_path(from, &block) ⇒ Object
56 57 58 59 60 61 |
# File 'lib/middleman-core/sitemap/extensions/import.rb', line 56 def import_path(from, &block) ImportPathDescriptor.new( from, block_given? ? block : proc { |path| path } ) end |
#String
This method returns an undefined value.
Import an external glob into source
43 |
# File 'lib/middleman-core/sitemap/extensions/import.rb', line 43 Contract String, String => ImportFileDescriptor |