Sha256: de26680f065402da4883e1c057d182690dbba54f5adc06e96223ae103985e277

Contents?: true

Size: 359 Bytes

Versions: 7

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

module ActsAsVotable
  module Extenders
    module Voter
      def voter?
        false
      end

      def acts_as_voter(*_args)
        require "acts_as_votable/voter"
        include ActsAsVotable::Voter

        class_eval do
          def self.voter?
            true
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
acts_as_votable-0.13.2 lib/acts_as_votable/extenders/voter.rb
acts_as_votable-0.13.1 lib/acts_as_votable/extenders/voter.rb
acts_as_votable-0.13.0 lib/acts_as_votable/extenders/voter.rb
acts_as_votable-0.12.1 lib/acts_as_votable/extenders/voter.rb
acts_as_votable-0.12.0 lib/acts_as_votable/extenders/voter.rb
acts_as_votable-0.11.1 lib/acts_as_votable/extenders/voter.rb
acts_as_votable-0.11.0 lib/acts_as_votable/extenders/voter.rb