class HaveAPI::Fs::Components::ActionErrors

Public Class Methods

new(action_dir, *args) click to toggle source
Calls superclass method
# File lib/haveapi/fs/components/action_errors.rb, line 15
def initialize(action_dir, *args)
  super(*args)
  @action_dir = action_dir
end

Public Instance Methods

contents() click to toggle source
Calls superclass method
# File lib/haveapi/fs/components/action_errors.rb, line 20
def contents
  ret = super
  return ret unless @errors
  ret.concat(@errors.keys.map(&:to_s))
  ret
end
set(errors) click to toggle source
# File lib/haveapi/fs/components/action_errors.rb, line 27
def set(errors)
  changed
  @errors = errors
end
title() click to toggle source
# File lib/haveapi/fs/components/action_errors.rb, line 32
def title
  'Errors'
end

Protected Instance Methods

new_child(name) click to toggle source
Calls superclass method
# File lib/haveapi/fs/components/action_errors.rb, line 37
def new_child(name)
  if child = super
    child

  elsif @errors && @errors.has_key?(name)
    [ActionError, @errors[name]]

  else
    nil
  end
end