Class: Pageflow::EditLock::Null
- Inherits:
-
Object
- Object
- Pageflow::EditLock::Null
- Defined in:
- app/models/pageflow/edit_lock.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Instance Method Summary collapse
- #acquire(user, options = {}) ⇒ Object
- #blank? ⇒ Boolean
- #held_by?(user) ⇒ Boolean
-
#initialize(entry) ⇒ Null
constructor
A new instance of Null.
- #release(user) ⇒ Object
- #verify!(user, options = {}) ⇒ Object
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
#entry ⇒ Object (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, = {}) entry.create_edit_lock!(:user => user) end |
#blank? ⇒ Boolean
78 79 80 |
# File 'app/models/pageflow/edit_lock.rb', line 78 def blank? true end |
#held_by?(user) ⇒ 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
89 90 91 |
# File 'app/models/pageflow/edit_lock.rb', line 89 def verify!(user, = {}) raise NotHeldError.new end |