lib/nanoc/cli/command_runner.rb in nanoc-3.6.7 vs lib/nanoc/cli/command_runner.rb in nanoc-3.6.8
- old
+ new
@@ -9,11 +9,11 @@
# @see http://rubydoc.info/gems/cri/Cri/CommandRunner#call-instance_method
#
# @return [void]
def call
Nanoc::CLI::ErrorHandler.handle_while(:command => self) do
- self.run
+ run
end
end
# Gets the site ({Nanoc::Site} instance) in the current directory and
# loads its data.
@@ -31,11 +31,11 @@
# @deprecated use `Cri::CommandDSL#runner`
#
# @see http://rubydoc.info/gems/cri/Cri/CommandDSL#runner-instance_method
def self.call(opts, args, cmd)
- self.new(opts, args, cmd).call
+ new(opts, args, cmd).call
end
# @return [Boolean] true if the current working directory is a nanoc site
# directory, false otherwise
def is_in_site_dir?
@@ -47,23 +47,23 @@
# message and exits.
#
# @return [void]
def require_site
if site.nil?
- raise ::Nanoc::Errors::GenericTrivial, "The current working directory does not seem to be a nanoc site."
+ raise ::Nanoc::Errors::GenericTrivial, 'The current working directory does not seem to be a nanoc site.'
end
end
# Asserts that the current working directory contains a site (just like
# {#require_site}) and loads the site into memory.
#
# @return [void]
def load_site
- self.require_site
- print "Loading site data… "
- self.site.load
- puts "done"
+ require_site
+ print 'Loading site data… '
+ site.load
+ puts 'done'
end
# @return [Boolean] true if debug output is enabled, false if not
#
# @see Nanoc::CLI.debug?
@@ -99,10 +99,10 @@
end
end
# @return [Array] The compilation stack.
def stack
- (self.site && self.site.compiler.stack) || []
+ (site && site.compiler.stack) || []
end
end
# @deprecated Use {Nanoc::CLI::CommandRunner} instead