Class: Aubergine::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/aubergine/path.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(satellite, ip) ⇒ Path

Returns a new instance of Path.



11
12
13
14
# File 'lib/aubergine/path.rb', line 11

def initialize(satellite, ip)
  @satellite = satellite
  @ip = ip
end

Class Method Details

.configure(repository) ⇒ Object



7
8
9
# File 'lib/aubergine/path.rb', line 7

def self.configure(repository)
  @@repository = repository
end

.repositoryObject



3
4
5
# File 'lib/aubergine/path.rb', line 3

def self.repository
  @@repository
end

Instance Method Details

#fullObject



20
21
22
# File 'lib/aubergine/path.rb', line 20

def full
  "#{@@repository}/#{@satellite}/#{@ip}"
end

#satelliteObject



16
17
18
# File 'lib/aubergine/path.rb', line 16

def satellite
  "#{@@repository}/#{@satellite}"
end

#shortObject



24
25
26
# File 'lib/aubergine/path.rb', line 24

def short
  "#{@satellite}/#{@ip}"
end