Class: Freighthop::CLI::Version
- Inherits:
-
Object
- Object
- Freighthop::CLI::Version
- Defined in:
- lib/freighthop/cli/version.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Version
constructor
A new instance of Version.
- #run ⇒ Object
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
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
#run ⇒ Object
9 10 11 |
# File 'lib/freighthop/cli/version.rb', line 9 def run puts "Freighthop #{Freighthop::VERSION}" end |