Class: Pigpio::Buffer
- Inherits:
-
String
- Object
- String
- Pigpio::Buffer
- Defined in:
- lib/pigpio/buffer.rb,
ext/pigpio/pigpio.c
Instance Attribute Summary collapse
-
#ret_code ⇒ Object
readonly
Returns the value of attribute ret_code.
Instance Method Summary collapse
-
#initialize(ret_code, str = nil) ⇒ Buffer
constructor
A new instance of Buffer.
- #valid? ⇒ Boolean
Constructor Details
#initialize(ret_code, str = nil) ⇒ Buffer
Returns a new instance of Buffer.
4 5 6 7 |
# File 'lib/pigpio/buffer.rb', line 4 def initialize(ret_code, str = nil) super(str) @ret_code = ret_code end |
Instance Attribute Details
#ret_code ⇒ Object (readonly)
Returns the value of attribute ret_code.
3 4 5 |
# File 'lib/pigpio/buffer.rb', line 3 def ret_code @ret_code end |
Instance Method Details
#valid? ⇒ Boolean
9 10 11 |
# File 'lib/pigpio/buffer.rb', line 9 def valid? @ret_code >= 0 end |