Sha256: b97d98d951d735277b1d28e8027500237f78e357f9101f864d504a24b906511a
Contents?: true
Size: 907 Bytes
Versions: 24
Compression:
Stored size: 907 Bytes
Contents
# encoding: utf-8 module Punchblock module Command class Reject < CommandNode register :reject, :core include HasHeaders VALID_REASONS = [:busy, :decline, :error].freeze # @return [Symbol] the reason type for rejecting a call. One of :busy, :dclined or :error. # @raises ArgumentError if reject_reason is not one of the allowed reasons attribute :reason, Symbol def reason=(reject_reason) if reject_reason && !VALID_REASONS.include?(reject_reason.to_sym) raise ArgumentError, "Invalid Reason (#{reject_reason}), use: #{VALID_REASONS*' '}" end super end def inherit(xml_node) if first_child = xml_node.at_xpath('*') self.reason = first_child.name end super end def rayo_children(root) root.send reason if reason super end end end end
Version data entries
24 entries across 24 versions & 1 rubygems