Class: ZSS::Message::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/zss/message/message_address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Address

Returns a new instance of Address.



10
11
12
13
14
# File 'lib/zss/message/message_address.rb', line 10

def initialize args = {}
  @sid      = args[:sid].try(:upcase)
  @verb     = args[:verb].try(:upcase)
  @sversion = args[:sversion].try(:upcase) || '*'
end

Instance Attribute Details

#sidObject

Returns the value of attribute sid.



6
7
8
# File 'lib/zss/message/message_address.rb', line 6

def sid
  @sid
end

#sversionObject

Returns the value of attribute sversion.



6
7
8
# File 'lib/zss/message/message_address.rb', line 6

def sversion
  @sversion
end

#verbObject

Returns the value of attribute verb.



6
7
8
# File 'lib/zss/message/message_address.rb', line 6

def verb
  @verb
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/zss/message/message_address.rb', line 16

def to_s
  "#{sid}:#{sversion}##{verb}"
end