From 407b884ef349d6dec12f50006ea6268c96205a83 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 21:34:48 +0900 Subject: adding yields for package workbook, workbook styles and cols collection on worksheet to make charting easier. --- doc/Axlsx/DataTypeValidator.html | 69 +++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 39 deletions(-) (limited to 'doc/Axlsx/DataTypeValidator.html') diff --git a/doc/Axlsx/DataTypeValidator.html b/doc/Axlsx/DataTypeValidator.html index 9da38c77..ec1a74c4 100644 --- a/doc/Axlsx/DataTypeValidator.html +++ b/doc/Axlsx/DataTypeValidator.html @@ -94,11 +94,10 @@

Overview

-

-Validate that the class of the value provided is either an instance or the + +

Validate that the class of the value provided is either an instance or the class of the allowed types and that any specified additional validation -returns true. -

+returns true.

@@ -135,9 +134,8 @@ returns true. -

-Perform validation. -

+
+

Perform validation.

@@ -161,9 +159,8 @@ Perform validation.

-

-Perform validation -

+ +

Perform validation

@@ -182,9 +179,8 @@ Perform validation — -

-The name of what is being validated. This is included in the error message -

+
+

The name of what is being validated. This is included in the error message

@@ -199,9 +195,8 @@ The name of what is being validated. This is included in the error message — -

-A single class or array of classes that the value is validated against. -

+
+

A single class or array of classes that the value is validated against.

@@ -218,9 +213,8 @@ A single class or array of classes that the value is validated against. — -

-Any block that must evaluate to true for the value to be valid -

+
+

Any block that must evaluate to true for the value to be valid

@@ -238,9 +232,8 @@ Any block that must evaluate to true for the value to be valid — -

-true if validation succeeds. -

+
+

true if validation succeeds.

@@ -257,10 +250,9 @@ true if validation succeeds. — -

-Raised if the class of the value provided is not in the specified array of -types or the block passed returns false -

+
+

Raised if the class of the value provided is not in the specified array of +types or the block passed returns false

@@ -294,17 +286,16 @@ types or the block passed returns false
# File 'lib/axlsx/util/validators.rb', line 34
 
-def self.validate(name, types, v, other= lambda{|arg| true })
-  types = [types] unless types.is_a? Array
-  valid_type = false
-  if v.class == Class
-    types.each { |t| valid_type = true if v.ancestors.include?(t) }
-  else
-    types.each { |t| valid_type = true if v.is_a?(t) }
-  end
-  raise ArgumentError, (ERR_TYPE % [v.inspect, name, types.inspect]) unless (other.call(v) && valid_type)
-end
-
+def self.validate(name, types, v, other= lambda{|arg| true }) + types = [types] unless types.is_a? Array + valid_type = false + if v.class == Class + types.each { |t| valid_type = true if v.ancestors.include?(t) } + else + types.each { |t| valid_type = true if v.is_a?(t) } + end + raise ArgumentError, (ERR_TYPE % [v.inspect, name, types.inspect]) unless (other.call(v) && valid_type) +end @@ -315,9 +306,9 @@ types or the block passed returns false
-- cgit v1.2.3