Skip to content

Commit 60d3944

Browse files
committedJul 29, 2013
Add Opal.use_gem helper method
1 parent 022a6bc commit 60d3944

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

Diff for: ‎lib/opal.rb

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ def self.append_path(path)
3434
paths << path
3535
end
3636

37+
def self.use_gem(gem_name)
38+
Opal.append_path File.join(Gem::Specification.find_by_name(gem_name).gem_dir, 'lib')
39+
end
40+
3741
# Private, don't add to these directly (use .append_path instead).
3842
def self.paths
3943
@paths ||= [core_dir, std_dir]

0 commit comments

Comments
 (0)