Module: Ramaze::Gems

Defined in:
lib/ramaze/contrib/gems.rb

Defined Under Namespace

Classes: GemStone

Class Method Summary collapse

Class Method Details

.gem(name, version = nil, options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/ramaze/contrib/gems.rb', line 6

def gem(name, version = nil, options = {})
  case version
  when String
    options[:version] = version
  when Hash
    options.merge!(version)
  end

  @gems << GemStone.new(name, options)
end

.options(opts = {}) ⇒ Object

options include:

:install_dir => where to install gems
:extconf     => additional options for building extensions


21
22
23
24
25
# File 'lib/ramaze/contrib/gems.rb', line 21

def options opts = {}
  @options ||= {}
  @options.merge! opts unless opts.empty?
  @options
end

.setup(opts = {}) ⇒ Object



27
28
29
30
# File 'lib/ramaze/contrib/gems.rb', line 27

def setup opts = {}
  options(opts)
  @gems.each{|gem| gem.setup }
end