Class: Spud::BuildTools::Make
- Defined in:
- lib/build_tools/make/make.rb
Constant Summary
Constants inherited from BuildTool
Instance Attribute Summary collapse
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
Methods inherited from BuildTool
Constructor Details
This class inherits a constructor from Spud::BuildTools::BuildTool
Instance Attribute Details
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
6 7 8 |
# File 'lib/build_tools/make/make.rb', line 6 def rules @rules end |
Instance Method Details
#mount! ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/build_tools/make/make.rb', line 8 def mount! @rules = {} return unless File.exist?('Makefile') source = File.read('Makefile') source.scan(/^(\S+):.*/).each do |match| name = match.first @rules[name] = Rule.new(name) end end |