class Cany::Recipes::Bundler::Gem

Attributes

dependencies[R]
name[R]

Public Class Methods

clear() click to toggle source

Clear all stored data. Only used in rspec

# File lib/cany/recipes/bundler/gem.rb, line 20
def self.clear
  @gems = {}
end
get(gem_name) click to toggle source

@api public This methods returns the Gem instance for the specified gem @param gem_name The gem name @return Cany::recipes::Bundler::Gem

# File lib/cany/recipes/bundler/gem.rb, line 6
def self.get(gem_name)
  @gems ||= {}
  @gems[gem_name] ||= new   gem_name
end
new(gem_name) click to toggle source
# File lib/cany/recipes/bundler/gem.rb, line 27
def initialize(gem_name)
  @name = gem_name
  @dependencies = []
end
specify(gem_name, &block) click to toggle source

@api public Specify meta data about the given gem @param gem_name the gem name @block: A block that defines the meta data. Executed inside the DSL subclass

# File lib/cany/recipes/bundler/gem.rb, line 15
def self.specify(gem_name, &block)
  DSL.new(get(gem_name)).run &block
end