Class: RushJobMongoid::QueueGroupsPresenter
- Inherits:
-
Object
- Object
- RushJobMongoid::QueueGroupsPresenter
- Defined in:
- app/presenters/rush_job_mongoid/queue_groups_presenter.rb
Instance Attribute Summary collapse
-
#queue_groups ⇒ Object
readonly
Returns the value of attribute queue_groups.
-
#queue_groups_presenter ⇒ Object
readonly
Returns the value of attribute queue_groups_presenter.
-
#rush_job_queue_groups ⇒ Object
readonly
Returns the value of attribute rush_job_queue_groups.
Instance Method Summary collapse
-
#initialize(queue_groups_page) ⇒ QueueGroupsPresenter
constructor
A new instance of QueueGroupsPresenter.
- #page ⇒ Object
- #pages_count ⇒ Object
Constructor Details
#initialize(queue_groups_page) ⇒ QueueGroupsPresenter
Returns a new instance of QueueGroupsPresenter.
5 6 7 8 9 |
# File 'app/presenters/rush_job_mongoid/queue_groups_presenter.rb', line 5 def initialize(queue_groups_page) @queue_groups_presenter = PaginationPresenter.new(queue_groups_page) @rush_job_queue_groups = RushJob.queue_groups @queue_groups = queue_groups_from_presener end |
Instance Attribute Details
#queue_groups ⇒ Object (readonly)
Returns the value of attribute queue_groups.
3 4 5 |
# File 'app/presenters/rush_job_mongoid/queue_groups_presenter.rb', line 3 def queue_groups @queue_groups end |
#queue_groups_presenter ⇒ Object (readonly)
Returns the value of attribute queue_groups_presenter.
3 4 5 |
# File 'app/presenters/rush_job_mongoid/queue_groups_presenter.rb', line 3 def queue_groups_presenter @queue_groups_presenter end |
#rush_job_queue_groups ⇒ Object (readonly)
Returns the value of attribute rush_job_queue_groups.
3 4 5 |
# File 'app/presenters/rush_job_mongoid/queue_groups_presenter.rb', line 3 def rush_job_queue_groups @rush_job_queue_groups end |
Instance Method Details
#page ⇒ Object
15 16 17 |
# File 'app/presenters/rush_job_mongoid/queue_groups_presenter.rb', line 15 def page @queue_groups_presenter.page end |
#pages_count ⇒ Object
11 12 13 |
# File 'app/presenters/rush_job_mongoid/queue_groups_presenter.rb', line 11 def pages_count @queue_groups_presenter.pages(@rush_job_queue_groups.count, 10) end |