Class: Validic::Summary

Inherits:
Object
  • Object
show all
Defined in:
lib/validic/summary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dateObject (readonly)

Returns the value of attribute end_date.



3
4
5
# File 'lib/validic/summary.rb', line 3

def end_date
  @end_date
end

#limitObject (readonly)

Returns the value of attribute limit.



3
4
5
# File 'lib/validic/summary.rb', line 3

def limit
  @limit
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/validic/summary.rb', line 3

def message
  @message
end

#nextObject (readonly)

Returns the value of attribute next.



3
4
5
# File 'lib/validic/summary.rb', line 3

def next
  @next
end

#offsetObject (readonly)

Returns the value of attribute offset.



3
4
5
# File 'lib/validic/summary.rb', line 3

def offset
  @offset
end

#previousObject (readonly)

Returns the value of attribute previous.



3
4
5
# File 'lib/validic/summary.rb', line 3

def previous
  @previous
end

#resultsObject (readonly)

Returns the value of attribute results.



3
4
5
# File 'lib/validic/summary.rb', line 3

def results
  @results
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



3
4
5
# File 'lib/validic/summary.rb', line 3

def start_date
  @start_date
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/validic/summary.rb', line 3

def status
  @status
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



3
4
5
# File 'lib/validic/summary.rb', line 3

def timestamp
  @timestamp
end