Module: Ohm::Boundaries

Defined in:
lib/ohm/contrib/boundaries.rb

Overview

Dirt cheap ::first and ::last support.

Examples:


class Post < Ohm::Model
  include Ohm::Boundaries
end

post1 = Post.create
post2 = Post.create
post1 == Post.first
# => true

post2 == Post.last
# => true

Defined Under Namespace

Modules: ClassMethods

Class Method Summary (collapse)

Class Method Details

+ (Object) included(base)



18
19
20
# File 'lib/ohm/contrib/boundaries.rb', line 18

def self.included(base)
  base.extend ClassMethods
end