Sha256: a824ab4c5b09852401d9a7721c2b0beb21e2b29bc243d2b1099babdc5672a548

Contents?: true

Size: 1.74 KB

Versions: 6

Compression:

Stored size: 1.74 KB

Contents

require 'mj/visitor'

module BuildTool; module Cfg;

    #
    # 
    #
    class Node < MJ::Visitable

        attr_accessor :values

        def value
            values
            #raise StandardError, "1 Value expected.#{values.length} values found!."
        end

        def initialize(values = nil)
            @values = values
        end

    end # class Node

    %w[
        ApplyPatches
        ArchiveDeclaration

        BuildSystemDeclaration
        BuildSystemOption
        BuildSystemInplace

        EnvironmentDeclaration
        EnvironmentVariable

        EnableFeature
        DisableFeature
        EnableModule
        DisableModule

        Feature
        ShortDescription
        LongDescription

        GitSvnDeclaration

        GitDeclaration
        GitRemotePath
        GitRemoteUrl
        GitRemoteDeclaration
        GitRemotePush
        GitTrack
        GitServer

        GitSvnExternal

        Include

        LogDirectory

        ModuleBuildPrefix
        ModuleDeclaration
        ModuleInstallPrefix
        ModuleLocalPath
        ModuleTemplate

        RepositoryDeclaration
        RepositoryPath
        RepositoryUser

        ServerDeclaration
        ServerHost
        ServerPath
        ServerProtocol

        SshKeyDeclaration
        SshKeyFile

        SvnDeclaration
        SvnCheckoutOnly
        RemotePath

        UseBuildSystem
        UseEnvironment
        UseRepository
        UseServer
        UseSshKey
        UseVcs

    ].each do |type|

        eval "class #{type}Node < Node; end"

    end


    class NodeList < Node
    end

    %w[
        ConfigurationFile

        ServerStatement
    ].each do |type|

        eval "class #{type}List < NodeList; end"

    end


end; end; # module BuildTool::Cfg

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
build-tool-0.5.7 lib/build-tool/cfg/node.rb
build-tool-0.5.6 lib/build-tool/cfg/node.rb
build-tool-0.5.5 lib/build-tool/cfg/node.rb
build-tool-0.5.4 lib/build-tool/cfg/node.rb
build-tool-0.5.3 lib/build-tool/cfg/node.rb
build-tool-0.5.2 lib/build-tool/cfg/node.rb