Class: Pageflow::EntryPublication
- Inherits:
-
Object
- Object
- Pageflow::EntryPublication
- Defined in:
- app/models/pageflow/entry_publication.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#quota ⇒ Object
readonly
Returns the value of attribute quota.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #exceeding? ⇒ Boolean
-
#initialize(entry, attributes, published_entries_quota, user) ⇒ EntryPublication
constructor
A new instance of EntryPublication.
- #save! ⇒ Object
Constructor Details
#initialize(entry, attributes, published_entries_quota, user) ⇒ EntryPublication
Returns a new instance of EntryPublication.
5 6 7 8 9 10 |
# File 'app/models/pageflow/entry_publication.rb', line 5 def initialize(entry, attributes, published_entries_quota, user) @entry = entry @attributes = attributes @quota = published_entries_quota @user = user end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'app/models/pageflow/entry_publication.rb', line 3 def attributes @attributes end |
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
3 4 5 |
# File 'app/models/pageflow/entry_publication.rb', line 3 def entry @entry end |
#quota ⇒ Object (readonly)
Returns the value of attribute quota.
3 4 5 |
# File 'app/models/pageflow/entry_publication.rb', line 3 def quota @quota end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'app/models/pageflow/entry_publication.rb', line 3 def user @user end |
Instance Method Details
#exceeding? ⇒ Boolean
12 13 14 |
# File 'app/models/pageflow/entry_publication.rb', line 12 def exceeding? assumed_quota.exceeded? end |