Class: Rubycc::Rmake::ExplicitRule

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycc/rmake/model.rb

Overview

An explicit rule as written: its target and prerequisite words and recipe lines are stored unexpanded, because make expands them against the final variable table (all mkmf assignments precede the rules that use them). A :: rule sets double_colon; order is the read order, used only to pick the default goal (the first non-special target seen).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(targets:, prerequisites:, recipe:, double_colon:, order:) ⇒ ExplicitRule

Returns a new instance of ExplicitRule.



36
37
38
39
40
41
42
# File 'lib/rubycc/rmake/model.rb', line 36

def initialize(targets:, prerequisites:, recipe:, double_colon:, order:)
  @targets = targets
  @prerequisites = prerequisites
  @recipe = recipe
  @double_colon = double_colon
  @order = order
end

Instance Attribute Details

#orderObject (readonly)

Returns the value of attribute order.



34
35
36
# File 'lib/rubycc/rmake/model.rb', line 34

def order
  @order
end

#prerequisitesObject (readonly)

Returns the value of attribute prerequisites.



34
35
36
# File 'lib/rubycc/rmake/model.rb', line 34

def prerequisites
  @prerequisites
end

#recipeObject (readonly)

Returns the value of attribute recipe.



34
35
36
# File 'lib/rubycc/rmake/model.rb', line 34

def recipe
  @recipe
end

#targetsObject (readonly)

Returns the value of attribute targets.



34
35
36
# File 'lib/rubycc/rmake/model.rb', line 34

def targets
  @targets
end

Instance Method Details

#double_colon?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/rubycc/rmake/model.rb', line 44

def double_colon?
  @double_colon
end