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.
Constructor Details
#initialize(path) ⇒ DSL
Returns a new instance of DSL.
3 4 5 6 |
# File 'lib/mundler/dsl.rb', line 3 def initialize(path) @config = Config.new @path = path end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
20 21 22 |
# File 'lib/mundler/dsl.rb', line 20 def config @config end |
Instance Method Details
#evaluate! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mundler/dsl.rb', line 8 def evaluate! platforms = Dir.glob(File.join(__dir__, "platforms", "*.rb")) platforms.each do |platform| instance_eval(File.read(platform)) end begin instance_eval(File.read(@path), @path) rescue Errno::ENOENT raise MundlefileNotFound end end |