class JCR::Failure
Attributes
data[RW]
definition[RW]
evaluation[RW]
json[RW]
json_elided[RW]
offset[RW]
pos[RW]
reason_elided[RW]
rule[RW]
stack_level[RW]
type[RW]
Public Class Methods
new(data, jcr, type, evaluation, stack_level)
click to toggle source
# File lib/jcr/evaluate_rules.rb, line 84 def initialize data, jcr, type, evaluation, stack_level if type == "member" @json = "\"#{data[0]}\" : #{data[1].to_json} " else @json = data.to_json end @json_elided = JCR::elide(@json) @data = JCR::rule_data( data ) @rule = JCR::find_first_slice( jcr ) @pos = @rule.line_and_column @offset = @rule.offset @type = type @evaluation = evaluation @reason_elided = "unknown reason" @reason_elided = JCR::elide( @evaluation.reason ) if @evaluation.reason @definition = JCR::rule_def( type, jcr ) @stack_level = stack_level end