Class: Cardio::Mod::ModfileLoader

Inherits:
Object
  • Object
show all
Includes:
ModfileApi
Defined in:
lib/cardio/mod/modfile_loader.rb

Overview

Loads the mod of a Modfile into a Mod::Dirs object

Instance Method Summary collapse

Methods included from ModfileApi

#mod

Constructor Details

#initialize(dirs) ⇒ ModfileLoader

Returns a new instance of ModfileLoader.



9
10
11
# File 'lib/cardio/mod/modfile_loader.rb', line 9

def initialize dirs
  @dirs = dirs
end

Instance Method Details

#load(modfile_path) ⇒ Object



13
14
15
# File 'lib/cardio/mod/modfile_loader.rb', line 13

def load modfile_path
  eval File.read(modfile_path), binding
end