Sha256: 03fe8c5874c834512d28edd7f0140e22857b381bbc2e95e8f331fab8bea04248
Contents?: true
Size: 694 Bytes
Versions: 5
Compression:
Stored size: 694 Bytes
Contents
usage 'shell' summary 'open a shell on the Nanoc environment' aliases 'console' description " Open an IRB shell on a context that contains @items, @layouts, and @config. " module Nanoc::CLI::Commands class Shell < ::Nanoc::CLI::CommandRunner def run require 'pry' require_site Nanoc::Int::Context.new(env).pry end protected def env self.class.env_for_site(site) end def self.env_for_site(site) { items: Nanoc::ItemCollectionView.new(site.items), layouts: Nanoc::LayoutCollectionView.new(site.layouts), config: Nanoc::ConfigView.new(site.config), } end end end runner Nanoc::CLI::Commands::Shell
Version data entries
5 entries across 5 versions & 1 rubygems