Module: RSpeed::Variable
- Defined in:
- lib/rspeed/variable.rb
Constant Summary collapse
- PIPES_PATTERN =
'rspeed:pipe_*'
- PROFILE_PATTERN =
'rspeed:profile_*'
Class Method Summary collapse
- .append_app_name(value, plus: nil) ⇒ Object
- .key(number) ⇒ Object
- .pipe ⇒ Object
- .previous_result ⇒ Object
- .profile ⇒ Object
- .result ⇒ Object
Class Method Details
.append_app_name(value, plus: nil) ⇒ Object
10 11 12 |
# File 'lib/rspeed/variable.rb', line 10 def append_app_name(value, plus: nil) [value, RSpeed::Env.app, plus].compact.join('_') end |
.key(number) ⇒ Object
14 15 16 |
# File 'lib/rspeed/variable.rb', line 14 def key(number) append_app_name('rspeed', plus: number).to_sym end |
.pipe ⇒ Object
22 23 24 |
# File 'lib/rspeed/variable.rb', line 22 def pipe append_app_name('rspeed:pipe', plus: format('%02d', RSpeed::Env.pipe)) end |
.previous_result ⇒ Object
26 27 28 |
# File 'lib/rspeed/variable.rb', line 26 def previous_result append_app_name('rspeed', plus: 'previous') end |
.profile ⇒ Object
30 31 32 |
# File 'lib/rspeed/variable.rb', line 30 def profile append_app_name('rspeed:profile', plus: format('%02d', RSpeed::Env.pipe)) end |
.result ⇒ Object
18 19 20 |
# File 'lib/rspeed/variable.rb', line 18 def result append_app_name('rspeed') end |