Module: RubyAPI::Rails::Gemfile
- Defined in:
- lib/rails/api_wrapper.rb
Instance Method Summary collapse
- #add_gem(name) ⇒ Object
- #find_gem(name, options = nil) ⇒ Object
- #inside_group(name, &block) ⇒ Object
- #replace_gem(name, replace_name) ⇒ Object
Instance Method Details
#add_gem(name) ⇒ Object
8 9 10 |
# File 'lib/rails/api_wrapper.rb', line 8 def add_gem(name) append_code("gem '#{name}'") end |
#find_gem(name, options = nil) ⇒ Object
18 19 20 |
# File 'lib/rails/api_wrapper.rb', line 18 def find_gem(name, = nil) find_call('gem', :args => ["#{name}", ]) end |
#inside_group(name, &block) ⇒ Object
4 5 6 |
# File 'lib/rails/api_wrapper.rb', line 4 def inside_group(name, &block) inside_block('group', :args => [:"#{name}"], :extend => RubyAPI::Rails::Gemfile, &block) end |
#replace_gem(name, replace_name) ⇒ Object
12 13 14 15 16 |
# File 'lib/rails/api_wrapper.rb', line 12 def replace_gem(name, replace_name) found = find_gem(name) puts "gem:#{found}" found.replace(:arg => name, :replace_arg => replace_name) if found end |