Method: Hashing#to_h

Defined in:
lib/hashing.rb

#to_hObject

The ‘Hash` returned by `#to_h` will be formed by keys based on the ivars names passed to `hasherize` method.

Examples:

File hahserized (which include ‘Hashing`)


file = File.new 'README.md', 'cfe9aacbc02528b'
file.to_h
# => { path: 'README.md', commit: 'cfe9aacbc02528b' }

Since:

  • 0.0.1



46
47
48
# File 'lib/hashing.rb', line 46

def to_h
  self.class.__hasher.to_h self
end