lib/sym/app/commands/base_command.rb in sym-2.6.2 vs lib/sym/app/commands/base_command.rb in sym-2.6.3
- old
+ new
@@ -48,21 +48,21 @@
include Sym
extend Forwardable
attr_accessor :application
- def_delegators :@application, :opts, :opts_original, :key
+ def_delegators :@application, :opts, :opts_slop, :key, :stdin, :stdout, :stderr, :kernel
def initialize(application)
self.application = application
end
def execute
raise Sym::Errors::AbstractMethodCalled.new(:run)
end
def content
- @content ||= (opts[:string] || (opts[:file].eql?('-') ? STDIN.read : ::File.read(opts[:file]).chomp))
+ @content ||= (opts[:string] || (opts[:file].eql?('-') ? stdin.read : ::File.read(opts[:file]).chomp))
end
def to_s
"#{self.class.short_name.to_s.bold.yellow}, with options: #{application.args.argv.join(' ').gsub(/--/, '').bold.green}"
end