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-0.3.14 lib/kafo/param_group.rb
kafo-0.3.13 lib/kafo/param_group.rb
kafo-0.3.12 lib/kafo/param_group.rb
kafo-0.3.11 lib/kafo/param_group.rb
kafo-0.3.10 lib/kafo/param_group.rb
kafo-0.3.9 lib/kafo/param_group.rb
kafo-0.3.8 lib/kafo/param_group.rb
kafo-0.3.7 lib/kafo/param_group.rb
kafo-0.3.6 lib/kafo/param_group.rb
kafo-0.3.5 lib/kafo/param_group.rb
kafo-0.3.4 lib/kafo/param_group.rb
kafo-0.3.3 lib/kafo/param_group.rb
kafo-0.3.2 lib/kafo/param_group.rb
kafo-0.3.1 lib/kafo/param_group.rb
kafo-0.3.0 lib/kafo/param_group.rb