From 4d16bfc43780e5d3f7368625700b583e3e98217a Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 18:11:42 +0900 Subject: adding in row_style and col_style methods to worksheet and active record 'acts_as_axlsx' to provide to_xlsx. --- doc/Axlsx/DataTypeValidator.html | 69 +++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 30 deletions(-) (limited to 'doc/Axlsx/DataTypeValidator.html') diff --git a/doc/Axlsx/DataTypeValidator.html b/doc/Axlsx/DataTypeValidator.html index 51a6b741..9da38c77 100644 --- a/doc/Axlsx/DataTypeValidator.html +++ b/doc/Axlsx/DataTypeValidator.html @@ -94,10 +94,11 @@

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. +

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

-
-

Perform validation.

+

+Perform validation. +

@@ -159,8 +161,9 @@ returns true.

- -

Perform validation

+

+Perform validation +

@@ -179,8 +182,9 @@ returns true.

— -
-

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 +

@@ -195,8 +199,9 @@ returns true.

— -
-

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. +

@@ -213,8 +218,9 @@ returns true.

— -
-

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 +

@@ -232,8 +238,9 @@ returns true.

— -
-

true if validation succeeds.

+

+true if validation succeeds. +

@@ -250,9 +257,10 @@ returns true.

— -
-

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 +

@@ -286,16 +294,17 @@ 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 + @@ -306,9 +315,9 @@ types or the block passed returns false

-- cgit v1.2.3