Class: Cumuli::App::Procs::SubApp
- Inherits:
-
Object
- Object
- Cumuli::App::Procs::SubApp
- Defined in:
- lib/cumuli/app/procs.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
-
#initialize(line) ⇒ SubApp
constructor
A new instance of SubApp.
- #name ⇒ Object
- #port ⇒ Object
Constructor Details
#initialize(line) ⇒ SubApp
Returns a new instance of SubApp.
35 36 37 |
# File 'lib/cumuli/app/procs.rb', line 35 def initialize(line) @parts = line.split end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
33 34 35 |
# File 'lib/cumuli/app/procs.rb', line 33 def parts @parts end |
Instance Method Details
#name ⇒ Object
39 40 41 |
# File 'lib/cumuli/app/procs.rb', line 39 def name parts.first.gsub(':', '') end |
#port ⇒ Object
43 44 45 46 47 |
# File 'lib/cumuli/app/procs.rb', line 43 def port if index = parts.find_index('-p') parts[index + 1] && parts[index + 1].to_i end end |