class PIM::ValidationMessage
Attributes
attribute_path[RW]
level[RW]
message[RW]
name[RW]
params[RW]
Public Class Methods
new(rule_name, level, attribute_path, message, params = {})
click to toggle source
# File pim.rb, line 9143 def initialize rule_name, level, attribute_path, message, params = {} @name = rule_name @level = level @attribute_path = attribute_path @message = message @params = params end
Public Instance Methods
as_json()
click to toggle source
# File pim.rb, line 9151 def as_json hash = { :name => @name.to_s, :level => @level, :path => @attribute_path, :message => @message } if not PIM.has_option?(:disable_message_parameters) hash[:params] = @params if @params end hash end