Class: Rubycc::Rmake::SuffixRule

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

Overview

A double-suffix inference rule such as .c.o: — build a to_suffix file from a same-stem from_suffix file using recipe.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_suffix:, to_suffix:, recipe:) ⇒ SuffixRule

Returns a new instance of SuffixRule.



54
55
56
57
58
# File 'lib/rubycc/rmake/model.rb', line 54

def initialize(from_suffix:, to_suffix:, recipe:)
  @from_suffix = from_suffix
  @to_suffix = to_suffix
  @recipe = recipe
end

Instance Attribute Details

#from_suffixObject (readonly)

Returns the value of attribute from_suffix.



52
53
54
# File 'lib/rubycc/rmake/model.rb', line 52

def from_suffix
  @from_suffix
end

#recipeObject (readonly)

Returns the value of attribute recipe.



52
53
54
# File 'lib/rubycc/rmake/model.rb', line 52

def recipe
  @recipe
end

#to_suffixObject (readonly)

Returns the value of attribute to_suffix.



52
53
54
# File 'lib/rubycc/rmake/model.rb', line 52

def to_suffix
  @to_suffix
end