lib/rsaml/validatable.rb
def valid?
      if respond_to?(:validate)
        begin
          validate
        rescue ValidationError => e
          puts "Validation failed: #{e.message}" if verbose
          return false
        end
      end
      return true
    end
# Return true if the object is valid. Only objects with a validate method will
# be checked for validity.
Return true if the object is valid. Only objects with a validate method will
be checked for validity.
Return true if the object is valid . Only objects with a validate method will be checked for validity .
def valid?
      if respond_to?(:validate)
        begin
          validate
        rescue ValidationError => e
          puts "Validation failed: #{e.message}" if verbose
          return false
        end
      end
      return true
    end
def valid? if respond_to? ( :validate ) begin validate rescue ValidationError => e puts "Validation failed: #{e.message}" if verbose return false end end return true end
Return true if the object is valid.
Return true if the object is valid .