Class: IncludePattern
Instance Attribute Summary
Attributes inherited from Pattern
Instance Method Summary collapse
- #dump(captured, out) ⇒ Object
-
#initialize(name, use_quotes = false) ⇒ IncludePattern
constructor
A new instance of IncludePattern.
Methods inherited from Pattern
Constructor Details
#initialize(name, use_quotes = false) ⇒ IncludePattern
Returns a new instance of IncludePattern.
75 76 77 78 79 |
# File 'ext/generate.rb', line 75 def initialize(name, use_quotes=false) @name = name @use_quotes = false super() end |
Instance Method Details
#dump(captured, out) ⇒ Object
81 82 83 84 85 86 87 |
# File 'ext/generate.rb', line 81 def dump(captured, out) if @use_quotes then out.puts "#include \"#{@name}\"" else out.puts "#include <#{@name}>" end end |