Module: Motion::Persistable

Included in:
User, User
Defined in:
lib/motion/persistable.rb,
lib/motion/persistable/version.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'lib/motion/persistable.rb', line 4

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

Instance Method Details

#persistence_keyObject



8
9
10
11
12
13
14
# File 'lib/motion/persistable.rb', line 8

def persistence_key
  if respond_to?(:key)
    key
  else
    name
  end
end