Sha256: 86aa780f2063ba4340251227beeacf8c40d0e036cae78e0355b40d1c4f8e43be

Contents?: true

Size: 351 Bytes

Versions: 21

Compression:

Stored size: 351 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord::Acts::List::TopOfListMethodDefiner #:nodoc:
  def self.call(caller_class, top_of_list)
    caller_class.class_eval do
      define_singleton_method :acts_as_list_top do
        top_of_list.to_i
      end

      define_method :acts_as_list_top do
        top_of_list.to_i
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
acts_as_list-0.9.11 lib/acts_as_list/active_record/acts/top_of_list_method_definer.rb