class Itsf::Services::V2::Response::Base
Attributes
errors[RW]
messages[RW]
success[W]
Public Class Methods
human_attribute_name(attr, _options = {})
click to toggle source
# File lib/itsf/services/v2/response/base.rb, line 29 def self.human_attribute_name(attr, _options = {}) attr end
lookup_ancestors()
click to toggle source
# File lib/itsf/services/v2/response/base.rb, line 33 def self.lookup_ancestors [self] end
new()
click to toggle source
# File lib/itsf/services/v2/response/base.rb, line 12 def initialize @messages = [] @errors = ActiveModel::Errors.new(self) end
Public Instance Methods
failed?()
click to toggle source
# File lib/itsf/services/v2/response/base.rb, line 21 def failed? !success? end
read_attribute_for_validation(attr)
click to toggle source
# File lib/itsf/services/v2/response/base.rb, line 25 def read_attribute_for_validation(attr) send(attr) end
success?()
click to toggle source
# File lib/itsf/services/v2/response/base.rb, line 17 def success? @errors.blank? end