Sha256: 8559efe56c0a731b732fd913680821707690cc35dae9a99f8eec2a8b219f7eb4

Contents?: true

Size: 302 Bytes

Versions: 11

Compression:

Stored size: 302 Bytes

Contents

module Preek
  # A container for smells in a class
  class SmellKlass
    attr_reader :name

    def initialize(name)
      @name = name
      @smells = []
    end

    def add(smell)
      @smells << smell
    end

    alias :<< :add

    def smells
      @smells.map(&:smell_string)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
preek-1.7.0 lib/preek/smell_klass.rb
preek-1.6.0 lib/preek/smell_klass.rb
preek-1.5.1 lib/preek/smell_klass.rb
preek-1.5.0 lib/preek/smell_klass.rb
preek-1.4.3 lib/preek/smell_klass.rb
preek-1.4.2 lib/preek/smell_klass.rb
preek-1.4.1 lib/preek/smell_klass.rb
preek-1.4.0 lib/preek/smell_klass.rb
preek-1.3.2 lib/preek/smell_klass.rb
preek-1.3.1 lib/preek/smell_klass.rb
preek-1.2.1 lib/preek/smell_klass.rb