Module: NullAndVoid::Persistable

Defined in:
lib/null_and_void/persistable.rb

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  []
end

#destroyed?Boolean

Returns:

  • (Boolean)


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

def destroyed?
  true
end

#new_record?Boolean

Returns:

  • (Boolean)


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

def new_record?
  true
end

#persisted?Boolean

Returns:

  • (Boolean)


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

def persisted?
  false
end

#readonly?Boolean

Returns:

  • (Boolean)


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

def readonly?
  true
end

#to_keyObject



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

def to_key
  []
end

#to_paramObject



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

def to_param
  ''
end

#valid?Boolean

Returns:

  • (Boolean)


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

def valid?
  true
end