Class: Mundler::DSL
- Inherits:
-
Object
- Object
- Mundler::DSL
- Defined in:
- lib/mundler/dsl.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #evaluate! ⇒ Object
-
#initialize(path) ⇒ DSL
constructor
A new instance of DSL.
- #load_libraries ⇒ Object
- #load_platforms ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
19 20 21 |
# File 'lib/mundler/dsl.rb', line 19 def config @config end |
Instance Method Details
#evaluate! ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/mundler/dsl.rb', line 11 def evaluate! begin instance_eval(File.read(@path), @path) rescue Errno::ENOENT raise MundlefileNotFound end end |
#load_libraries ⇒ Object
21 22 23 24 25 26 |
# File 'lib/mundler/dsl.rb', line 21 def load_libraries libraries = Dir.glob(File.join(__dir__, "libraries", "*.rb")) libraries.each do |library| instance_eval(File.read(library)) end end |
#load_platforms ⇒ Object
28 29 30 31 32 33 |
# File 'lib/mundler/dsl.rb', line 28 def load_platforms platforms = Dir.glob(File.join(__dir__, "platforms", "*.rb")) platforms.each do |platform| instance_eval(File.read(platform)) end end |