Class: CommandFeedback::Service::ErrorFeedback

Inherits:
Object
  • Object
show all
Defined in:
lib/command_feedback/feedback.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_data) ⇒ ErrorFeedback

Returns a new instance of ErrorFeedback.



50
51
52
53
54
55
56
57
# File 'lib/command_feedback/feedback.rb', line 50

def initialize(error_data)
  @errors = []
  error_data.each { |attribute, errors|
    errors.each { |error|
      @errors << "#{attribute} #{error}"
    }
  }
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



48
49
50
# File 'lib/command_feedback/feedback.rb', line 48

def errors
  @errors
end

Instance Method Details

#successfull?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/command_feedback/feedback.rb', line 59

def successfull?
  false
end