Parent

Methods

Warbler::Gems

A set of gems. This only exists to allow expected operations to be used to add gems, and for backwards compatibility. It would be easier to just use a hash.

Constants

ANY_VERSION

Public Class Methods

new(gems = nil) click to toggle source
# File lib/warbler/gems.rb, line 15
def initialize(gems = nil)
  if gems.is_a?(Hash)
    self.merge!(gems)
  elsif gems.is_a?(Array)
    gems.each {|gem| self << gem }
  end
end

Public Instance Methods

+(other) click to toggle source
# File lib/warbler/gems.rb, line 27
def +(other)
  other.each {|g| self[g] ||= ANY_VERSION }
  self
end
-(other) click to toggle source
# File lib/warbler/gems.rb, line 32
def -(other)
  other.each {|g| self.delete(g)}
  self
end
<<(gem) click to toggle source
# File lib/warbler/gems.rb, line 23
def <<(gem)
  self[gem] ||= ANY_VERSION
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.