Class: MG

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/mg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gemspec) ⇒ MG

Returns a new instance of MG.



8
9
10
11
12
# File 'lib/mg.rb', line 8

def initialize(gemspec)
  @gemspec = gemspec

  define_tasks
end

Instance Attribute Details

#gemspecObject

Returns the value of attribute gemspec.



6
7
8
# File 'lib/mg.rb', line 6

def gemspec
  @gemspec
end

Instance Method Details

#nameObject



14
15
16
# File 'lib/mg.rb', line 14

def name
  spec.name
end

#specObject



18
19
20
21
22
23
# File 'lib/mg.rb', line 18

def spec
  @spec ||= begin
    require "rubygems/specification"
    eval File.read(gemspec)
  end
end