Module: Card::Set::All::Error::Format

Extended by:
Card::Set::AbstractFormat
Defined in:
tmpsets/set/mod021-standard/all/error.rb

Instance Method Summary collapse

Instance Method Details

#standard_error_message(attribute, message) ⇒ Object

for override



52
53
54
# File 'tmpsets/set/mod021-standard/all/error.rb', line 52

def standard_error_message attribute, message
  "#{attribute.to_s.upcase}: #{message}"
end

#standard_errorsObject



45
46
47
48
49
# File 'tmpsets/set/mod021-standard/all/error.rb', line 45

def standard_errors
  card.errors.map do |attrib, msg|
    attrib == :abort ? msg : standard_error_message(attrib, msg)
  end
end

#unsupported_view_error_message(view) ⇒ Object



56
57
58
# File 'tmpsets/set/mod021-standard/all/error.rb', line 56

def unsupported_view_error_message view
  tr(:unsupported_view, view: view, cardname: card.name)
end