class Xeme::Messages
This object holds the arrays of errors, warnings, and notes. It can mostly be treated like a hash. The main difference between a Xeme::Messages
object and a hash is that any? returns true or false based on if there are any messages, not if there are any elements in the hash.
Public Class Methods
new()
click to toggle source
new() takes no parameters.
# File lib/xeme.rb, line 538 def initialize @hsh = {} @hsh['errors'] = [] @hsh['warnings'] = [] @hsh['notes'] = [] end
Public Instance Methods
any?()
click to toggle source
Returns if there are any messages in any of the errors, warnings, or notes arrays.
# File lib/xeme.rb, line 557 def any? @hsh.values.each do |arr| arr.any? and return true end return false end