Class: Quaff::CSeq
- Inherits:
-
Object
- Object
- Quaff::CSeq
- Defined in:
- lib/call.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#num ⇒ Object
readonly
Returns the value of attribute num.
Instance Method Summary collapse
- #increment ⇒ Object
-
#initialize(cseq_str) ⇒ CSeq
constructor
A new instance of CSeq.
- #to_s ⇒ Object
Constructor Details
#initialize(cseq_str) ⇒ CSeq
Returns a new instance of CSeq.
12 13 14 15 |
# File 'lib/call.rb', line 12 def initialize cseq_str @num, @method = cseq_str.split @num = @num.to_i end |
Instance Attribute Details
#num ⇒ Object (readonly)
Returns the value of attribute num.
11 12 13 |
# File 'lib/call.rb', line 11 def num @num end |
Instance Method Details
#increment ⇒ Object
17 18 19 20 |
# File 'lib/call.rb', line 17 def increment @num = @num + 1 to_s end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/call.rb', line 22 def to_s "#{@num.to_s} #{@method}" end |