Sha256: ab837150cfa77be5f409e15c2964042fc4d19750b70388bdad450022299ac584

Contents?: true

Size: 530 Bytes

Versions: 3

Compression:

Stored size: 530 Bytes

Contents

require 'verbs'

module ActsInRelation
  module Supports
    module Verb
      PATCHES = {
        'follow' => 'following'
      }

      def pastize
        verb.conjugate(tense: :past).split(' ').last
      end

      def progressize
        return PATCHES[self] if PATCHES.has_key?(self)

        verb.conjugate(aspect: :progressive).split(' ').last
      end

      # TODO: Implement this method more logically
      def peoplize
        action = (last == 'e') ? chop : self
        action + 'ers'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acts_in_relation-0.1.1 lib/acts_in_relation/supports/verb.rb
acts_in_relation-0.1.0 lib/acts_in_relation/supports/verb.rb
acts_in_relation-0.0.1 lib/acts_in_relation/supports/verb.rb