Sha256: 9b92c99ccb6d05e0057f4886eb37d3ad9617a7c08388352bd3235d6eab6051f2

Contents?: true

Size: 545 Bytes

Versions: 10

Compression:

Stored size: 545 Bytes

Contents

module RbPlusPlus
  module Builders

    # Node for an #include line.
    # Can be a :local (default) or :system
    # include declaration.
    #
    # Includes have no children
    class IncludeNode < Base

      def initialize(parent, path, type = :local)
        super(nil, parent)

        @path = path
        @type = type
      end

      def build
        #nop
      end

      def write
        if @path
          includes << (@type == :local ? "#include \"#{@path}\"" : "#include <#{@path}>")
        end
      end

    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbplusplus-1.4.0 lib/rbplusplus/builders/include.rb
rbplusplus-1.3.0 lib/rbplusplus/builders/include.rb
rbplusplus-1.2.1 lib/rbplusplus/builders/include.rb
rbplusplus-1.2.0 lib/rbplusplus/builders/include.rb
rbplusplus-1.1.0 lib/rbplusplus/builders/include.rb
rbplusplus-1.0.3 lib/rbplusplus/builders/include.rb
rbplusplus-1.0.1 lib/rbplusplus/builders/include.rb
rbplusplus-1.0 lib/rbplusplus/builders/include.rb
rbplusplus-0.9.1 lib/rbplusplus/builders/include.rb
rbplusplus-0.9 lib/rbplusplus/builders/include.rb