Class: XmlConv::State::Transactions::PageFacade
- Inherits:
-
Object
- Object
- XmlConv::State::Transactions::PageFacade
- Defined in:
- lib/xmlconv/state/transactions.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
-
#pages ⇒ Object
Returns the value of attribute pages.
Instance Method Summary collapse
-
#initialize(int) ⇒ PageFacade
constructor
A new instance of PageFacade.
- #next ⇒ Object
- #previous ⇒ Object
- #to_i ⇒ Object
- #to_s ⇒ Object
- #total ⇒ Object
Constructor Details
#initialize(int) ⇒ PageFacade
Returns a new instance of PageFacade.
12 13 14 |
# File 'lib/xmlconv/state/transactions.rb', line 12 def initialize(int) @int = int end |
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
11 12 13 |
# File 'lib/xmlconv/state/transactions.rb', line 11 def model @model end |
#pages ⇒ Object
Returns the value of attribute pages.
11 12 13 |
# File 'lib/xmlconv/state/transactions.rb', line 11 def pages @pages end |
Instance Method Details
#next ⇒ Object
15 16 17 |
# File 'lib/xmlconv/state/transactions.rb', line 15 def next PageFacade.new(@int.next) end |
#previous ⇒ Object
22 23 24 |
# File 'lib/xmlconv/state/transactions.rb', line 22 def previous PageFacade.new(@int-1) end |
#to_i ⇒ Object
28 29 30 |
# File 'lib/xmlconv/state/transactions.rb', line 28 def to_i @int end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/xmlconv/state/transactions.rb', line 31 def to_s @int.next.to_s end |
#total ⇒ Object
25 26 27 |
# File 'lib/xmlconv/state/transactions.rb', line 25 def total @pages.size end |