lib/sym/app/commands/base_command.rb in sym-2.2.1 vs lib/sym/app/commands/base_command.rb in sym-2.3.0
- old
+ new
@@ -67,9 +67,13 @@
def execute
raise Sym::Errors::AbstractMethodCalled.new(:run)
end
+ def content
+ @content ||= (opts[:string] || (opts[:file].eql?('-') ? STDIN.read : File.read(opts[:file])))
+ end
+
def to_s
"#{self.class.short_name.to_s.bold.yellow}, with options: #{application.args.argv.join(' ').gsub(/--/, '').bold.green}"
end
def create_key