Class: Punchblock::Translator::Asterisk::Channel
- Defined in:
- lib/punchblock/translator/asterisk/channel.rb
Constant Summary collapse
- NORMALIZATION_REGEXP =
/^(?<prefix>Bridge\/)*(?<name>[^<>]*)(?<suffix><.*>)*$/.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new(other) ⇒ Object
9 10 11 |
# File 'lib/punchblock/translator/asterisk/channel.rb', line 9 def self.new(other) other.is_a?(self) ? other : super end |
Instance Method Details
#bridged? ⇒ Boolean
25 26 27 |
# File 'lib/punchblock/translator/asterisk/channel.rb', line 25 def bridged? @bridged ||= (prefix || suffix) end |
#name ⇒ Object
13 14 15 |
# File 'lib/punchblock/translator/asterisk/channel.rb', line 13 def name matchdata[:name] end |
#prefix ⇒ Object
17 18 19 |
# File 'lib/punchblock/translator/asterisk/channel.rb', line 17 def prefix matchdata[:prefix] end |
#suffix ⇒ Object
21 22 23 |
# File 'lib/punchblock/translator/asterisk/channel.rb', line 21 def suffix matchdata[:suffix] end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/punchblock/translator/asterisk/channel.rb', line 29 def to_s __getobj__ end |