Class: Nanoc::Int::SiteLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/base/repos/site_loader.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cwd_is_nanoc_site?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/nanoc/base/repos/site_loader.rb', line 16

def self.cwd_is_nanoc_site?
  Nanoc::Int::ConfigLoader.cwd_is_nanoc_site?
end

Instance Method Details

#new_emptyObject



3
4
5
# File 'lib/nanoc/base/repos/site_loader.rb', line 3

def new_empty
  site_from_config(Nanoc::Int::Configuration.new.with_defaults)
end

#new_from_cwdObject



11
12
13
# File 'lib/nanoc/base/repos/site_loader.rb', line 11

def new_from_cwd
  site_from_config(Nanoc::Int::ConfigLoader.new.new_from_cwd)
end

#new_with_config(hash) ⇒ Object



7
8
9
# File 'lib/nanoc/base/repos/site_loader.rb', line 7

def new_with_config(hash)
  site_from_config(Nanoc::Int::Configuration.new(hash: hash).with_defaults)
end