module Validate
Public Instance Methods
get_validate(name)
click to toggle source
# File lib/ebngen/unifmt.rb, line 46 def get_validate(name) if @validate_hash.has_key?(name) return @validate_hash[name] end end
validate(name, value)
click to toggle source
# File lib/ebngen/unifmt.rb, line 39 def validate(name, value) if @validate_hash.has_key?(name) return @validate_hash[name] == value.class end true end
validate_array(name)
click to toggle source
# File lib/ebngen/unifmt.rb, line 24 def validate_array(name) @validate_hash = Hash.new if @validate_hash.nil? @validate_hash[name] = Array end
validate_hash(name)
click to toggle source
# File lib/ebngen/unifmt.rb, line 34 def validate_hash(name) @validate_hash = Hash.new if @validate_hash.nil? @validate_hash[name] = Hash end
validate_string(name)
click to toggle source
# File lib/ebngen/unifmt.rb, line 29 def validate_string(name) @validate_hash = Hash.new if @validate_hash.nil? @validate_hash[name] = String end