Class: Spring::Env

Inherits:
Object
  • Object
show all
Defined in:
lib/spring/env.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEnv

Returns a new instance of Env.



8
9
10
# File 'lib/spring/env.rb', line 8

def initialize
  @root = Pathname.new(File.expand_path('.'))
end

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



6
7
8
# File 'lib/spring/env.rb', line 6

def root
  @root
end

Instance Method Details

#pidfile_pathObject



26
27
28
# File 'lib/spring/env.rb', line 26

def pidfile_path
  tmp_path.join("#{SID.sid}.pid")
end

#socket_nameObject



22
23
24
# File 'lib/spring/env.rb', line 22

def socket_name
  socket_path.to_s
end

#socket_pathObject



18
19
20
# File 'lib/spring/env.rb', line 18

def socket_path
  tmp_path.join(SID.sid.to_s)
end

#tmp_pathObject



12
13
14
15
16
# File 'lib/spring/env.rb', line 12

def tmp_path
  path = root.join('tmp/spring')
  path.mkdir unless path.exist?
  path
end