module CommandKit::Options::Version::ClassMethods

Defines class-level methods.

Public Instance Methods

version(new_version=nil) click to toggle source

Gets or sets the version string.

@param [String, nil] new_version

If given a new version String, it will set the class'es version
string.

@return [String, nil]

The classes version string.

@api public

# File lib/command_kit/options/version.rb, line 40
def version(new_version=nil)
  if new_version
    @version = new_version
  else
    @version || (superclass.version if superclass.kind_of?(ClassMethods))
  end
end