Class: Bitferry::Endpoint::Local

Inherits:
Bitferry::Endpoint show all
Defined in:
lib/bitferry.rb

Constant Summary

Constants inherited from Bitferry::Endpoint

ROUTE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Bitferry::Endpoint

restore

Constructor Details

#initialize(root) ⇒ Local

Returns a new instance of Local.



1376
# File 'lib/bitferry.rb', line 1376

def initialize(root) = @root = Pathname.new(root).realdirpath

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



1373
1374
1375
# File 'lib/bitferry.rb', line 1373

def root
  @root
end

Instance Method Details

#externalizeObject



1382
1383
1384
1385
1386
1387
# File 'lib/bitferry.rb', line 1382

def externalize
  {
    endpoint: :local,
    root: root
  }
end

#generationObject



1399
# File 'lib/bitferry.rb', line 1399

def generation = 0

#intact?Boolean

Returns:

  • (Boolean)


1393
# File 'lib/bitferry.rb', line 1393

def intact? = true

#refers?(volume) ⇒ Boolean

Returns:

  • (Boolean)


1396
# File 'lib/bitferry.rb', line 1396

def refers?(volume) = false

#restore(hash) ⇒ Object



1379
# File 'lib/bitferry.rb', line 1379

def restore(hash) = initialize(hash.fetch(:root))

#show_statusObject



1390
# File 'lib/bitferry.rb', line 1390

def show_status = root.to_s