class Epuber::Command::FromFile
Public Class Methods
Source
# File lib/epuber/command/from_file.rb, line 16 def initialize(argv) @filepath = argv.arguments!.first super(argv) end
@param [CLAide::ARGV] argv
Calls superclass method
Epuber::Command::new
Public Instance Methods
Source
# File lib/epuber/command/from_file.rb, line 32 def run super FromFileExecutor.new(@filepath).run end
Calls superclass method
Epuber::Command::run
Source
# File lib/epuber/command/from_file.rb, line 22 def validate! super help! 'You must specify path to existing EPUB file' if @filepath.nil? help! "File #{@filepath} doesn't exists" unless File.exist?(@filepath) existing = Dir.glob('*.bookspec') help! "Can't reinit this folder, #{existing.first} already exists." unless existing.empty? end
Calls superclass method