Class: Eh::Settings
- Inherits:
-
Object
- Object
- Eh::Settings
- Defined in:
- lib/eh/settings.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Settings
constructor
A new instance of Settings.
- #package_tmp_dir ⇒ Object
- #processes_src_dir ⇒ Object
- #release_dir ⇒ Object
- #repository_root_dir ⇒ Object
Constructor Details
#initialize(data) ⇒ Settings
Returns a new instance of Settings.
17 18 19 |
# File 'lib/eh/settings.rb', line 17 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
2 3 4 |
# File 'lib/eh/settings.rb', line 2 def data @data end |
Class Method Details
.current ⇒ Object
13 14 15 |
# File 'lib/eh/settings.rb', line 13 def self.current Thread.current[:eh_settings] end |
.current=(value) ⇒ Object
9 10 11 |
# File 'lib/eh/settings.rb', line 9 def self.current=(value) Thread.current[:eh_settings] = value end |
Instance Method Details
#package_tmp_dir ⇒ Object
34 35 36 |
# File 'lib/eh/settings.rb', line 34 def package_tmp_dir './tmp' end |
#processes_src_dir ⇒ Object
30 31 32 |
# File 'lib/eh/settings.rb', line 30 def processes_src_dir File.join(repository_root_dir, 'src', 'process') end |
#release_dir ⇒ Object
26 27 28 |
# File 'lib/eh/settings.rb', line 26 def release_dir File.join(repository_root_dir, 'releases', 'ruby') end |
#repository_root_dir ⇒ Object
22 23 24 |
# File 'lib/eh/settings.rb', line 22 def repository_root_dir File.(data['repository_root_dir']) end |