Sha256: fbed42f5651f8a08518849632ef0bae02d81a840eb5f289696ee2173cf308fbe

Contents?: true

Size: 579 Bytes

Versions: 10

Compression:

Stored size: 579 Bytes

Contents

require 'neutral/voting_builder/elements/link'
require 'neutral/voting_builder/elements/span'

module Neutral
  module VotingBuilder
    module Elements
      private

      %w[positive negative difference].each do |span|
        define_method("#{span}_span") do
          Span.const_get(span.capitalize).new voting.send(span)
        end
      end


      %w[positive negative remove].each do |link|
        define_method("#{link}_link") do
          Link.const_get(link.capitalize).new router[link], Neutral.icons.send(icons).send(link)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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