Class: Commands::Version

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

Instance Method Summary collapse

Instance Method Details

#optionsObject

holds the options that were passed you can set any initial defaults here



13
14
15
16
# File 'lib/commands/version.rb', line 13

def options
  @options ||= {
  }
end

#register(opts, global_options) ⇒ Object



24
25
26
27
# File 'lib/commands/version.rb', line 24

def register(opts, global_options)
  opts.banner = "Usage: version"
  opts.description = "Returns the version only."
end

#required_optionsObject

required options



19
20
21
22
# File 'lib/commands/version.rb', line 19

def required_options
  @required_options ||= Set.new [
  ]
end

#run(global_options) ⇒ Object



29
30
31
# File 'lib/commands/version.rb', line 29

def run(global_options)
  puts "#{Info.version}"
end