Class: Freighthop::CLI::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/freighthop/cli/version.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Version

Returns a new instance of Version.



5
6
7
# File 'lib/freighthop/cli/version.rb', line 5

def initialize(*args)
  @args = args
end

Class Method Details

.match?(*args) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/freighthop/cli/version.rb', line 13

def self.match?(*args)
  ['version', '-v', '--version' ].include?(args.first)
end

Instance Method Details

#runObject



9
10
11
# File 'lib/freighthop/cli/version.rb', line 9

def run
  puts "Freighthop #{Freighthop::VERSION}"
end