Class: Pageflow::EditLock::Null

Inherits:
Object
  • Object
show all
Defined in:
app/models/pageflow/edit_lock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ Null

Returns a new instance of Null


64
65
66
# File 'app/models/pageflow/edit_lock.rb', line 64

def initialize(entry)
  @entry = entry
end

Instance Attribute Details

#entryObject (readonly)

Returns the value of attribute entry


62
63
64
# File 'app/models/pageflow/edit_lock.rb', line 62

def entry
  @entry
end

Instance Method Details

#aquire(user, options = {}) ⇒ Object


76
77
78
# File 'app/models/pageflow/edit_lock.rb', line 76

def aquire(user, options = {})
  entry.create_edit_lock!(:user => user)
end

#blank?Boolean

Returns:

  • (Boolean)

72
73
74
# File 'app/models/pageflow/edit_lock.rb', line 72

def blank?
  true
end

#held_by?(user) ⇒ Boolean

Returns:

  • (Boolean)

68
69
70
# File 'app/models/pageflow/edit_lock.rb', line 68

def held_by?(user)
  false
end

#release(user) ⇒ Object


80
81
# File 'app/models/pageflow/edit_lock.rb', line 80

def release(user)
end

#verify!(user, options = {}) ⇒ Object

Raises:


83
84
85
# File 'app/models/pageflow/edit_lock.rb', line 83

def verify!(user, options = {})
  raise NotHeldError.new
end