Sha256: 7f0abea24650bf671908f1f37725ccedb27a4a1991e691a762903e2c6963b557

Contents?: true

Size: 489 Bytes

Versions: 95

Compression:

Stored size: 489 Bytes

Contents

#encoding: UTF-8

module Kafo
  class ParamGroup
    attr_reader :children, :params, :name
    attr_accessor :module


    def initialize(name)
      @children = []
      @params   = []
      @name     = name
    end

    def formatted_name
      @formatted_name ||= @name.sub(/:\Z/,'')
    end

    def add_child(group)
      @children.push group unless @children.include?(group)
    end

    def add_param(param)
      @params.push param unless @params.include?(param)
    end
  end
end

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
kafo-7.6.0 lib/kafo/param_group.rb
kafo-7.5.1 lib/kafo/param_group.rb
kafo-7.5.0 lib/kafo/param_group.rb
kafo-7.4.0 lib/kafo/param_group.rb
kafo-7.3.0 lib/kafo/param_group.rb
kafo-7.2.0 lib/kafo/param_group.rb
kafo-7.1.0 lib/kafo/param_group.rb
kafo-7.0.0 lib/kafo/param_group.rb
kafo-6.5.0 lib/kafo/param_group.rb
kafo-6.4.1 lib/kafo/param_group.rb
kafo-6.4.0 lib/kafo/param_group.rb
kafo-6.3.0 lib/kafo/param_group.rb
kafo-6.2.1 lib/kafo/param_group.rb
kafo-6.2.0 lib/kafo/param_group.rb
kafo-6.1.2 lib/kafo/param_group.rb
kafo-6.1.1 lib/kafo/param_group.rb
kafo-6.1.0 lib/kafo/param_group.rb
kafo-6.0.0 lib/kafo/param_group.rb
kafo-5.1.0 lib/kafo/param_group.rb
kafo-5.0.1 lib/kafo/param_group.rb