class SimpleParams::ValidationMatchers::NestedArrayMatcher

Attributes

attribute[RW]

Public Class Methods

new(attribute) click to toggle source
Calls superclass method
# File lib/simple_params/validation_matchers/nested_array_matcher.rb, line 10
def initialize(attribute)
  super(attribute)
  @attribute = attribute
end

Public Instance Methods

description() click to toggle source
# File lib/simple_params/validation_matchers/nested_array_matcher.rb, line 21
def description
  "Should have nested array #{@attribute}"
end
failure_message_for_should() click to toggle source
# File lib/simple_params/validation_matchers/nested_array_matcher.rb, line 25
def failure_message_for_should
  "Should have nested array #{@attribute}"
end
failure_message_for_should_not() click to toggle source
# File lib/simple_params/validation_matchers/nested_array_matcher.rb, line 29
def failure_message_for_should_not
  "Should not have nested array #{@attribute}"
end
matches?(subject) click to toggle source
Calls superclass method
# File lib/simple_params/validation_matchers/nested_array_matcher.rb, line 15
def matches?(subject)
  super(subject)
  subject.send(:nested_classes).has_key?(@attribute) &&
  subject.send(:nested_classes)[@attribute.to_sym].array?
end