Class: Validic::Summary
- Inherits:
-
Object
- Object
- Validic::Summary
- Defined in:
- lib/validic/summary.rb
Instance Attribute Summary collapse
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#previous ⇒ Object
readonly
Returns the value of attribute previous.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(sum_hash) ⇒ Summary
constructor
A new instance of Summary.
Constructor Details
#initialize(sum_hash) ⇒ Summary
Returns a new instance of Summary.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/validic/summary.rb', line 5 def initialize(sum_hash) sum_hash = Hash(sum_hash) @timestamp = sum_hash["timestamp"] @status = sum_hash["status"] @offset = sum_hash["offset"] @message = sum_hash["message"] @results = sum_hash["results"] @start_date = sum_hash["start_date"] @end_date = sum_hash["end_date"] @limit = sum_hash["limit"] @previous = sum_hash["previous"] @next = sum_hash["next"] end |
Instance Attribute Details
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def end_date @end_date end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def limit @limit end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def @message end |
#next ⇒ Object (readonly)
Returns the value of attribute next.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def next @next end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def offset @offset end |
#previous ⇒ Object (readonly)
Returns the value of attribute previous.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def previous @previous end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def results @results end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def start_date @start_date end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def status @status end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/validic/summary.rb', line 3 def @timestamp end |