class RbPlusPlus::Builders::IncludeNode

Node for an include line. Can be a :local (default) or :system include declaration.

Includes have no children

Public Class Methods

new(parent, path, type = :local) click to toggle source
# File lib/rbplusplus/builders/include.rb, line 11
def initialize(parent, path, type = :local)
  super(nil, parent)

  @path = path
  @type = type
end

Public Instance Methods

build() click to toggle source
# File lib/rbplusplus/builders/include.rb, line 18
def build
  #nop
end
write() click to toggle source
# File lib/rbplusplus/builders/include.rb, line 22
def write
  if @path
    includes << (@type == :local ? "#include \"#{@path}\"" : "#include <#{@path}>")
  end
end