class IceCube::HashBuilder

Public Class Methods

new(rule = nil) click to toggle source
# File lib/ice_cube/builders/hash_builder.rb, line 5
def initialize(rule = nil)
  @hash = { :validations => {}, :rule_type => rule.class.name }
end

Public Instance Methods

[]=(key, value) click to toggle source
# File lib/ice_cube/builders/hash_builder.rb, line 13
def []=(key, value)
  @hash[key] = value
end
to_hash() click to toggle source
# File lib/ice_cube/builders/hash_builder.rb, line 21
def to_hash
  @hash
end
validations() click to toggle source
# File lib/ice_cube/builders/hash_builder.rb, line 9
def validations
  @hash[:validations]
end
validations_array(type) click to toggle source
# File lib/ice_cube/builders/hash_builder.rb, line 17
def validations_array(type)
  validations[type] ||= []
end