Module: Adva::Static::Import::Source

Defined in:
lib/adva/static/import/source.rb,
lib/adva/static/import/source/base.rb,
lib/adva/static/import/source/blog.rb,
lib/adva/static/import/source/page.rb,
lib/adva/static/import/source/path.rb,
lib/adva/static/import/source/post.rb,
lib/adva/static/import/source/site.rb,
lib/adva/static/import/source/section.rb

Defined Under Namespace

Classes: Base, Blog, Page, Path, Post, Section, Site

Constant Summary collapse

TYPES =
[Site] + Section::TYPES

Class Method Summary collapse

Class Method Details

.build(type, path) ⇒ Object



16
17
18
# File 'lib/adva/static/import/source.rb', line 16

def build(type, path)
  const_get(type).new(path)
end

.recognize(paths) ⇒ Object



20
21
22
# File 'lib/adva/static/import/source.rb', line 20

def recognize(paths)
  [Site, Post, Section].map { |type| type.recognize(paths) }.flatten.compact.sort
end