Class: ComunikaGsm::PDU::PDUEncode
- Inherits:
-
Object
- Object
- ComunikaGsm::PDU::PDUEncode
- Defined in:
- lib/comunika_gsm/pdu.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(pdu) ⇒ PDUEncode
constructor
A new instance of PDUEncode.
Constructor Details
#initialize(pdu) ⇒ PDUEncode
Returns a new instance of PDUEncode.
17 18 19 20 |
# File 'lib/comunika_gsm/pdu.rb', line 17 def initialize(pdu) pdu = pdu.split(/\n/) @size = pdu[0]; @body = pdu[1] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
16 17 18 |
# File 'lib/comunika_gsm/pdu.rb', line 16 def body @body end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
16 17 18 |
# File 'lib/comunika_gsm/pdu.rb', line 16 def size @size end |