Class: Gem::RequestSet::GemDepedencyAPI
- Inherits:
-
Object
- Object
- Gem::RequestSet::GemDepedencyAPI
- Defined in:
- lib/rubygems/request_set.rb
Overview
A semi-compatible DSL for Bundler’s Gemfile format
Instance Method Summary collapse
- #gem(name, *reqs) ⇒ Object
- #group(*what) ⇒ Object
-
#initialize(set, path) ⇒ GemDepedencyAPI
constructor
A new instance of GemDepedencyAPI.
- #load ⇒ Object
- #platform(what) ⇒ Object (also: #platforms)
-
#source(url) ⇒ Object
DSL.
Constructor Details
#initialize(set, path) ⇒ GemDepedencyAPI
Returns a new instance of GemDepedencyAPI.
149 150 151 152 |
# File 'lib/rubygems/request_set.rb', line 149 def initialize(set, path) @set = set @path = path end |
Instance Method Details
#gem(name, *reqs) ⇒ Object
163 164 165 166 167 168 |
# File 'lib/rubygems/request_set.rb', line 163 def gem(name, *reqs) # Ignore the opts for now. reqs.pop if reqs.last.kind_of?(Hash) @set.gem name, *reqs end |
#group(*what) ⇒ Object
178 179 |
# File 'lib/rubygems/request_set.rb', line 178 def group(*what) end |
#load ⇒ Object
154 155 156 |
# File 'lib/rubygems/request_set.rb', line 154 def load instance_eval File.read(@path).untaint, @path, 1 end |
#platform(what) ⇒ Object Also known as: platforms
170 171 172 173 174 |
# File 'lib/rubygems/request_set.rb', line 170 def platform(what) if what == :ruby yield end end |
#source(url) ⇒ Object
DSL
160 161 |
# File 'lib/rubygems/request_set.rb', line 160 def source(url) end |