Class: HashOut::Hasher

Inherits:
Struct
  • Object
show all
Defined in:
lib/hash_out/hasher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#call_registryObject

Returns the value of attribute call_registry



4
5
6
# File 'lib/hash_out/hasher.rb', line 4

def call_registry
  @call_registry
end

#objectObject

Returns the value of attribute object



4
5
6
# File 'lib/hash_out/hasher.rb', line 4

def object
  @object
end

Instance Method Details

#exclude(method) ⇒ Object



16
17
18
# File 'lib/hash_out/hasher.rb', line 16

def exclude method
  exclusions.add method
end

#exclusionsObject



12
13
14
# File 'lib/hash_out/hasher.rb', line 12

def exclusions
  @exclusions ||= Set.new
end

#object_to_hashObject



5
6
7
8
9
10
# File 'lib/hash_out/hasher.rb', line 5

def object_to_hash
  prepare_hashable_methods
  set_hash
  delete_exclusions
  @hash
end