Class: Autorake::Definitions
- Inherits:
-
Object
- Object
- Autorake::Definitions
- Defined in:
- lib/autorake/definition.rb
Instance Attribute Summary collapse
-
#directories ⇒ Object
readonly
Returns the value of attribute directories.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#features ⇒ Object
readonly
Returns the value of attribute features.
Instance Method Summary collapse
- #dump ⇒ Object
- #incpath ⇒ Object
-
#initialize ⇒ Definitions
constructor
A new instance of Definitions.
- #libpath ⇒ Object
- #parameters ⇒ Object
- #perform ⇒ Object
Constructor Details
#initialize ⇒ Definitions
Returns a new instance of Definitions.
17 18 19 20 21 22 23 |
# File 'lib/autorake/definition.rb', line 17 def initialize @environment = {} @directories = Directories.new @features = {} @args = { :par => {}, :inc => {}, :lib => {}, } @checks = [] end |
Instance Attribute Details
#directories ⇒ Object (readonly)
Returns the value of attribute directories.
12 13 14 |
# File 'lib/autorake/definition.rb', line 12 def directories @directories end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
12 13 14 |
# File 'lib/autorake/definition.rb', line 12 def environment @environment end |
#features ⇒ Object (readonly)
Returns the value of attribute features.
12 13 14 |
# File 'lib/autorake/definition.rb', line 12 def features @features end |
Instance Method Details
#dump ⇒ Object
25 26 27 28 |
# File 'lib/autorake/definition.rb', line 25 def dump c = perform c.dump end |
#incpath ⇒ Object
14 |
# File 'lib/autorake/definition.rb', line 14 def incpath ; @args[ :inc] ; end |
#libpath ⇒ Object
15 |
# File 'lib/autorake/definition.rb', line 15 def libpath ; @args[ :lib] ; end |
#parameters ⇒ Object
13 |
# File 'lib/autorake/definition.rb', line 13 def parameters ; @args[ :par] ; end |
#perform ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/autorake/definition.rb', line 30 def perform Builder.quiet = true c = Configuration.new @environment, @directories c.do_env c.features.update @features d = @directories. "INCLUDE" ; c.incdirs.push d d = @directories. "LIB" ; c.libdirs.push d af = @features.keys.map { |k| AddFeature.new k } am = @args[ :par].map { |k,v| AddMacro.new k, v } ai = @args[ :inc].map { |k,v| AddIncdir.new k, v } al = @args[ :lib].map { |k,v| AddLibdir.new k, v } [ af, am, ai, al, @checks].each { |a| a.each { |k| k.perform c } } c end |