Class: IbanLookup::IbanCom

Inherits:
Object
  • Object
show all
Defined in:
lib/iban-lookup.rb

Defined Under Namespace

Classes: IbanCalc, IbanChecker

Constant Summary collapse

URL =
'https://www.iban.com'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iban = nil, options = {}) ⇒ IbanCom

Returns a new instance of IbanCom.



35
36
37
38
39
40
41
# File 'lib/iban-lookup.rb', line 35

def initialize(iban = nil, options = {})
  @object = if iban
              IbanChecker.new(iban)
            else
              IbanCalc.new(options)
            end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object (private)



161
162
163
# File 'lib/iban-lookup.rb', line 161

def method_missing(name, *args)
  object.send(name, *args)
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



33
34
35
# File 'lib/iban-lookup.rb', line 33

def object
  @object
end