Sha256: 85619aa313cda9fca1453d64a61808e104254c022dc6a3621755e52de816adca

Contents?: true

Size: 498 Bytes

Versions: 10

Compression:

Stored size: 498 Bytes

Contents

module Neutral
  module Icons
    class Set
      attr_reader :definitions
      def initialize(name, &block)
        @name = name
        @definitions = Neutral.icons.send(Neutral.config.default_icon_set).to_h
        instance_eval(&block) if block_given?
      end

      def name
        @name.to_sym
      end

      [:positive, :negative, :remove].each do |icon|
        define_method(icon) do |definition|
          definitions[icon] = definition.to_s
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
neutral-0.0.10 lib/neutral/icons/set.rb
neutral-0.0.9 lib/neutral/icons/set.rb
neutral-0.0.8 lib/neutral/icons/set.rb
neutral-0.0.7 lib/neutral/icons/set.rb
neutral-0.0.6 lib/neutral/icons/set.rb
neutral-0.0.5 lib/neutral/icons/set.rb
neutral-0.0.4 lib/neutral/icons/set.rb
neutral-0.0.3 lib/neutral/icons/set.rb
neutral-0.0.2 lib/neutral/icons/set.rb
neutral-0.0.1 lib/neutral/icons/set.rb