Class: Memstat::Proc::Base
- Inherits:
-
Object
- Object
- Memstat::Proc::Base
- Defined in:
- lib/memstat/proc/base.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#pid ⇒ Object
Returns the value of attribute pid.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #pid? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 |
# File 'lib/memstat/proc/base.rb', line 6 def initialize( = {}) raise Error.new('path or pid must be given') unless [:path] || [:pid] @pid = [:pid] @path = [:path] end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/memstat/proc/base.rb', line 4 def path @path end |
#pid ⇒ Object
Returns the value of attribute pid.
4 5 6 |
# File 'lib/memstat/proc/base.rb', line 4 def pid @pid end |
Instance Method Details
#pid? ⇒ Boolean
12 13 14 |
# File 'lib/memstat/proc/base.rb', line 12 def pid? !!@pid end |