Module: Ronin::Core::Metadata::Version::ClassMethods

Defined in:
lib/ronin/core/metadata/version.rb

Overview

Class methods.

Instance Method Summary collapse

Instance Method Details

#version(new_version = nil) ⇒ String?

Gets or sets the version number.

Examples:

Setting the version:

version '0.2'

Getting the version:

MyModule.version

Parameters:

  • new_version (String, nil) (defaults to: nil)

    The optional new version number to set.

Returns:

  • (String, nil)

    The previously set version number.



68
69
70
71
72
# File 'lib/ronin/core/metadata/version.rb', line 68

def version(new_version=nil)
  if new_version then @version = new_version
  else                @version
  end
end