Class: Esaj::Metadata
- Inherits:
-
Object
- Object
- Esaj::Metadata
- Defined in:
- lib/esaj/metadata.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #error_message ⇒ Object
-
#initialize(url) ⇒ Metadata
constructor
A new instance of Metadata.
- #total_pages ⇒ Object
Constructor Details
#initialize(url) ⇒ Metadata
Returns a new instance of Metadata.
7 8 9 |
# File 'lib/esaj/metadata.rb', line 7 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/esaj/metadata.rb', line 5 def url @url end |
Instance Method Details
#error? ⇒ Boolean
15 16 17 |
# File 'lib/esaj/metadata.rb', line 15 def error? !.empty? end |
#error_message ⇒ Object
19 20 21 |
# File 'lib/esaj/metadata.rb', line 19 def end |
#total_pages ⇒ Object
11 12 13 |
# File 'lib/esaj/metadata.rb', line 11 def total_pages (total_records.to_f/records_per_page).round end |