Module: Twilio::Rails::HasDirection

Extended by:
ActiveSupport::Concern
Defined in:
lib/twilio/rails/concerns/has_direction.rb

Overview

Provides scopes, validations, and convenience methods for a model that has an attribute direction with values "inbound" or "outbound".

Instance Method Summary collapse

Instance Method Details

#inbound?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/twilio/rails/concerns/has_direction.rb', line 17

def inbound?
  direction == "inbound"
end

#outbound?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/twilio/rails/concerns/has_direction.rb', line 21

def outbound?
  direction == "outbound"
end