Module: Gem::Release::GemCommand

Defined Under Namespace

Classes: Setup

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments


46
47
48
# File 'lib/gem/release/support/gem_command.rb', line 46

def arguments
  @arguments
end

#defaults_strObject

Returns the value of attribute defaults_str


46
47
48
# File 'lib/gem/release/support/gem_command.rb', line 46

def defaults_str
  @defaults_str
end

#descriptionObject

Returns the value of attribute description


46
47
48
# File 'lib/gem/release/support/gem_command.rb', line 46

def description
  @description
end

#usageObject

Returns the value of attribute usage


46
47
48
# File 'lib/gem/release/support/gem_command.rb', line 46

def usage
  @usage
end

Class Method Details

.included(const) ⇒ Object


41
42
43
44
# File 'lib/gem/release/support/gem_command.rb', line 41

def self.included(const)
  const.singleton_class.send(:attr_accessor, :cmd)
  const.send(:alias_method, :opts, :options)
end

Instance Method Details

#cmdObject


59
60
61
# File 'lib/gem/release/support/gem_command.rb', line 59

def cmd
  self.class.cmd
end

#executeObject


53
54
55
56
57
# File 'lib/gem/release/support/gem_command.rb', line 53

def execute
  Cmds::Runner.new(cmd, opts.delete(:args), opts).run
rescue Abort => ex
  abort(ex.message)
end

#initializeObject


48
49
50
51
# File 'lib/gem/release/support/gem_command.rb', line 48

def initialize
  super(cmd)
  Setup.new(cmd, self).run
end