class Mako::Errors

Attributes

messages[RW]

Public Class Methods

new() click to toggle source
# File lib/mako/errors.rb, line 7
def initialize
  @messages = []
end

Public Instance Methods

add_error(msg) click to toggle source

Add an error message to the messages array

@param [String]

# File lib/mako/errors.rb, line 14
def add_error(msg)
  messages << msg
end
any?() click to toggle source

Predicate method to see if there are any error messages

@return [Boolean]

# File lib/mako/errors.rb, line 21
def any?
  messages.count.positive?
end