Class Index [+]

Quicksearch

ActiveLdap::Schema::Syntaxes::Boolean

Public Instance Methods

normalize_value(value) click to toggle source
     # File lib/active_ldap/schema/syntaxes.rb, line 92
 92:         def normalize_value(value)
 93:           case value
 94:           when true, "1"
 95:             "TRUE"
 96:           when false, "0"
 97:             "FALSE"
 98:           else
 99:             value
100:           end
101:         end
type_cast(value) click to toggle source
    # File lib/active_ldap/schema/syntaxes.rb, line 81
81:         def type_cast(value)
82:           case value
83:           when "TRUE"
84:             true
85:           when "FALSE"
86:             false
87:           else
88:             value
89:           end
90:         end

Private Instance Methods

validate_normalized_value(value, original_value) click to toggle source
     # File lib/active_ldap/schema/syntaxes.rb, line 104
104:         def validate_normalized_value(value, original_value)
105:           if %(TRUE FALSE).include?(value)
106:             nil
107:           else
108:             _("%s should be TRUE or FALSE") % original_value.inspect
109:           end
110:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.