Module: Cardio::Mod::ModfileApi

Included in:
ModfileLoader
Defined in:
card/lib/cardio/mod/modfile_api.rb

Overview

Methods used via “eval” in Modfiles

Instance Method Summary collapse

Instance Method Details

#gem_mod(name) ⇒ Object



9
10
11
12
13
# File 'card/lib/cardio/mod/modfile_api.rb', line 9

def gem_mod name
  deps = Mod.dependencies name
  unknown_gem_mod!(name) if deps.blank?
  deps.each { |spec| @dirs.add_gem_mod spec.name, spec.full_gem_path }
end

#gem_modsObject

load all gem mods



16
17
18
# File 'card/lib/cardio/mod/modfile_api.rb', line 16

def gem_mods
  @dirs.load_from_gemfile
end

#mod(mod_name, path = nil) ⇒ Object



5
6
7
# File 'card/lib/cardio/mod/modfile_api.rb', line 5

def mod mod_name, path=nil
  @dirs.add_mod mod_name, path
end