Class: GoogleSafeBrowsing::HashHelper::GsbHash

Inherits:
Object
  • Object
show all
Defined in:
lib/google_safe_browsing/hash_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ GsbHash

Returns a new instance of GsbHash.



5
6
7
# File 'lib/google_safe_browsing/hash_helper.rb', line 5

def initialize(hash)
  @hash = hash
end

Instance Method Details

#prefixObject



9
10
11
# File 'lib/google_safe_browsing/hash_helper.rb', line 9

def prefix
  @hash[0..7]
end

#to_sObject



13
14
15
# File 'lib/google_safe_browsing/hash_helper.rb', line 13

def to_s
  @hash
end