class Nanoc::CLI::Commands::Shell

Protected Class Methods

env_for_site(site) click to toggle source
# File lib/nanoc/cli/commands/shell.rb, line 24
def self.env_for_site(site)
  {
    items: Nanoc::ItemCollectionWithRepsView.new(site.items, nil),
    layouts: Nanoc::LayoutCollectionView.new(site.layouts, nil),
    config: Nanoc::ConfigView.new(site.config, nil),
  }
end

Public Instance Methods

run() click to toggle source
# File lib/nanoc/cli/commands/shell.rb, line 10
def run
  require 'pry'

  load_site

  Nanoc::Int::Context.new(env).pry
end

Protected Instance Methods

env() click to toggle source
# File lib/nanoc/cli/commands/shell.rb, line 20
def env
  self.class.env_for_site(site)
end