class HashIdentable::Configuration
Public Class Methods
new()
click to toggle source
# File lib/hash_identable/configuration.rb, line 13 def initialize @hash_length = 36 end
Public Instance Methods
add_object(klass, id)
click to toggle source
# File lib/hash_identable/configuration.rb, line 17 def add_object klass, id klass.class_eval do include(HashIdentable) end lookup_table.store(id, klass.to_s) end
hash_length()
click to toggle source
# File lib/hash_identable/configuration.rb, line 29 def hash_length return @hash_length unless @hash_length.nil? raise "You must set the hash_length for the system" end
salt()
click to toggle source
# File lib/hash_identable/configuration.rb, line 24 def salt return @salt unless @salt.nil? raise "You must set the salt for the system" end
set_length(length_of_string)
click to toggle source
# File lib/hash_identable/configuration.rb, line 38 def set_length(length_of_string) @hash_length = length_of_string end
set_salt(new_salt)
click to toggle source
# File lib/hash_identable/configuration.rb, line 34 def set_salt(new_salt) @salt = new_salt end
Private Instance Methods
lookup_table()
click to toggle source
# File lib/hash_identable/configuration.rb, line 42 def lookup_table HashIdentable::lookup_table end