Module: NullAndVoid::Persistable

Defined in:
lib/null_and_void/persistable.rb

Instance Method Summary collapse

Instance Method Details

#allObject



23
24
25
# File 'lib/null_and_void/persistable.rb', line 23

def all
  []
end

#destroyed?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/null_and_void/persistable.rb', line 19

def destroyed?
  true
end

#idObject



3
4
5
# File 'lib/null_and_void/persistable.rb', line 3

def id
  nil
end

#new_record?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/null_and_void/persistable.rb', line 15

def new_record?
  true
end

#persisted?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/null_and_void/persistable.rb', line 11

def persisted?
  false
end

#readonly?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/null_and_void/persistable.rb', line 7

def readonly?
  true
end

#to_keyObject



27
28
29
# File 'lib/null_and_void/persistable.rb', line 27

def to_key
  []
end

#to_paramObject



31
32
33
# File 'lib/null_and_void/persistable.rb', line 31

def to_param
  ''
end

#valid?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/null_and_void/persistable.rb', line 35

def valid?
  true
end