Sha256: becf432905229751d95216d8b141cd53ae627f374b6b5fdd64f6a6ff931a96ae

Contents?: true

Size: 818 Bytes

Versions: 20

Compression:

Stored size: 818 Bytes

Contents

module BuildTool

class Feature

    attr_writer :active
    attr_accessor :description
    attr_accessor :long_description
    attr_reader :modules
    attr_reader :environments

    def initialize( name = nil, parent = nil, active = true )
        @name = name
        @active = active
        @parent = parent
        @description = nil
        @long_description = nil
        @modules = []
        @environments = []
    end

    def active?
        if @parent.nil?
            @active
        else
            @parent.active? && @active
        end
    end

    def name
        @name
    end

    def path
        if @parent.nil?
            @name
        else
            "%s/%s" % [ @parent.name, @name ]
        end
    end

    def parent
        @parent
    end

end # class Feature

end # module BuildTool

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
build-tool-0.5.7 lib/build-tool/feature.rb
build-tool-0.5.6 lib/build-tool/feature.rb
build-tool-0.5.5 lib/build-tool/feature.rb
build-tool-0.5.4 lib/build-tool/feature.rb
build-tool-0.5.3 lib/build-tool/feature.rb
build-tool-0.5.2 lib/build-tool/feature.rb
build-tool-0.4.6 lib/build-tool/feature.rb
build-tool-0.5.1 lib/build-tool/feature.rb
build-tool-0.4.5 lib/build-tool/feature.rb
build-tool-0.5.0 lib/build-tool/feature.rb
build-tool-0.4.4 lib/build-tool/feature.rb
build-tool-0.4.3 lib/build-tool/feature.rb
build-tool-0.4.2 lib/build-tool/feature.rb
build-tool-0.4.1 lib/build-tool/feature.rb
build-tool-0.4.0 lib/build-tool/feature.rb
build-tool-0.3.3 lib/build-tool/feature.rb
build-tool-0.3.2 lib/build-tool/feature.rb
build-tool-0.3.1 lib/build-tool/feature.rb
build-tool-0.3 lib/build-tool/feature.rb
build-tool-0.2 lib/build-tool/feature.rb