Class: Quaff::CSeq

Inherits:
Object
  • Object
show all
Defined in:
lib/call.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#numObject (readonly)

Returns the value of attribute num.



11
12
13
# File 'lib/call.rb', line 11

def num
  @num
end

Instance Method Details

#incrementObject



17
18
19
20
# File 'lib/call.rb', line 17

def increment
  @num = @num + 1
  to_s
end

#to_sObject



22
23
24
# File 'lib/call.rb', line 22

def to_s
  "#{@num.to_s} #{@method}"
end