Skip to content

Instantly share code, notes, and snippets.

class TwilioPricing
attr_reader :pricelist
def initialize
self.refresh_pricelist
end
def pricing_for(number, duration = 1)
internal_number = number.to_s.scan(/\d/).join('') # cast and filter...
if number.length == 10