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.



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

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

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



1400
1401
1402
# File 'lib/bitferry.rb', line 1400

def root
  @root
end

Instance Method Details

#externalizeObject



1409
1410
1411
1412
1413
1414
# File 'lib/bitferry.rb', line 1409

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

#generationObject



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

def generation = 0

#intact?Boolean

Returns:

  • (Boolean)


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

def intact? = true

#refers?(volume) ⇒ Boolean

Returns:

  • (Boolean)


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

def refers?(volume) = false

#restore(hash) ⇒ Object



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

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

#show_statusObject



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

def show_status = root.to_s