Class: Bookbinder::Commands::Version
- Inherits:
-
Object
- Object
- Bookbinder::Commands::Version
- Includes:
- Naming
- Defined in:
- lib/bookbinder/commands/version.rb
Instance Method Summary collapse
-
#initialize(logger) ⇒ Version
constructor
A new instance of Version.
- #run ⇒ Object
- #usage ⇒ Object
Methods included from Naming
#command_for?, #command_type, #flag?
Constructor Details
#initialize(logger) ⇒ Version
Returns a new instance of Version.
8 9 10 |
# File 'lib/bookbinder/commands/version.rb', line 8 def initialize(logger) @logger = logger end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 |
# File 'lib/bookbinder/commands/version.rb', line 16 def run(*) root = File.('../../../../', __FILE__) @logger.log "bookbinder #{Gem::Specification::load(File.join root, "bookbinder.gemspec").version}" 0 end |
#usage ⇒ Object
12 13 14 |
# File 'lib/bookbinder/commands/version.rb', line 12 def usage [command_name, "Print the version of bookbinder"] end |