Class: IncludePattern

Inherits:
Pattern show all
Defined in:
ext/generate.rb

Instance Attribute Summary

Attributes inherited from Pattern

#search_files

Instance Method Summary collapse

Methods inherited from Pattern

#matches_end, #matches_start

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