Sha256: a37c2d3c213dc0163d7a987dccd5d68a0e904c5d5167d942dd05863db18df168

Contents?: true

Size: 447 Bytes

Versions: 22

Compression:

Stored size: 447 Bytes

Contents

module PagSeguro
  class Phone
    include ActiveModel::Validations

    validates_presence_of :area_code, :number
    validates_length_of :area_code, is: 2
    validates_length_of :number, in: 7..9

    # Set the area code.
    attr_accessor :area_code

    # Set the phone number.
    # Must have 7-9 numbers.
    attr_accessor :number

    def initialize(area_code, number)
      @area_code = area_code
      @number = number
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pagseguro-transparente-1.1.0 lib/pagseguro/phone.rb
pagseguro-transparente-1.0.1 lib/pagseguro/phone.rb
pagseguro-transparente-1.0.0 lib/pagseguro/phone.rb
pagseguro-transparente-0.2.5 lib/pagseguro/phone.rb
pagseguro-transparente-0.2.4 lib/pagseguro/phone.rb
pagseguro-transparente-0.2.3 lib/pagseguro/phone.rb
pagseguro-transparente-0.2.2 lib/pagseguro/phone.rb
pagseguro-transparente-0.2.1 lib/pagseguro/phone.rb
pagseguro-transparente-0.2.0 lib/pagseguro/phone.rb
pagseguro-transparente-0.1.3 lib/pagseguro/phone.rb
pagseguro-transparente-0.1.2 lib/pagseguro/phone.rb
pagseguro-transparente-0.1.1 lib/pagseguro/phone.rb
pagseguro-transparente-0.1.0 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.9 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.8 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.7 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.6 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.5 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.4 lib/pagseguro/phone.rb
pagseguro-transparente-0.0.3 lib/pagseguro/phone.rb