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.



70
71
72
# File 'app/models/pageflow/edit_lock.rb', line 70

def initialize(entry)
  @entry = entry
end

Instance Attribute Details

#entryObject (readonly)

Returns the value of attribute entry.



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

def entry
  @entry
end

Instance Method Details

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



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

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

#blank?Boolean

Returns:

  • (Boolean)


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

def blank?
  true
end

#held_by?(user) ⇒ Boolean

Returns:

  • (Boolean)


74
75
76
# File 'app/models/pageflow/edit_lock.rb', line 74

def held_by?(user)
  false
end

#release(user) ⇒ Object



86
87
# File 'app/models/pageflow/edit_lock.rb', line 86

def release(user)
end

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

Raises:



89
90
91
# File 'app/models/pageflow/edit_lock.rb', line 89

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