module Blockchainable
The concern for ActiveRecord models
Constants
- VERSION
Public Instance Methods
hash!()
click to toggle source
# File lib/blockchainable.rb, line 14 def hash! sha = Digest::SHA256.new data_to_hash.each do |data| sha.update send(data).to_s if defined? data end @hash = sha.hexdigest end
hash_is_valid?()
click to toggle source
# File lib/blockchainable.rb, line 25 def hash_is_valid? true end