class Spritpreisrechner::Response
Attributes
code[R]
errors[R]
name[R]
stations[RW]
uuid[R]
Public Class Methods
new(response)
click to toggle source
# File lib/spritpreisrechner/response.rb, line 6 def initialize(response) @uuid = response[:uuid] rescue nil @errors = response[:errors] rescue [] @code = response[:code] rescue nil @name = response[:name] rescue nil @stations = [] end
Public Instance Methods
any?()
click to toggle source
# File lib/spritpreisrechner/response.rb, line 22 def any? @stations.any? end
count()
click to toggle source
# File lib/spritpreisrechner/response.rb, line 26 def count @stations.count end
error?()
click to toggle source
# File lib/spritpreisrechner/response.rb, line 18 def error? @errors.any? end
success?()
click to toggle source
# File lib/spritpreisrechner/response.rb, line 14 def success? @errors.empty? end