Class: Higgs::Storage::ClientSideLocalhostCheckHandler
- Inherits:
-
Object
- Object
- Higgs::Storage::ClientSideLocalhostCheckHandler
- Defined in:
- lib/higgs/storage.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path, messg) ⇒ ClientSideLocalhostCheckHandler
constructor
A new instance of ClientSideLocalhostCheckHandler.
Constructor Details
#initialize(path, messg) ⇒ ClientSideLocalhostCheckHandler
Returns a new instance of ClientSideLocalhostCheckHandler.
1193 1194 1195 1196 |
# File 'lib/higgs/storage.rb', line 1193 def initialize(path, messg) @path = File.(path) @messg = messg end |
Instance Method Details
#call ⇒ Object
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'lib/higgs/storage.rb', line 1198 def call unless (File.exist? @path) then raise 'client should exist in localhost.' end File.open(@path, 'r') {|f| f.binmode if (f.read != @messg) then raise 'client should exist in localhost.' end } nil end |