Class: Kountries::LookupByCode

Inherits:
Object
  • Object
show all
Defined in:
lib/kountries/lookup_by_code.rb

Overview

lookup country by code

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ LookupByCode

Returns a new instance of LookupByCode.



10
11
12
# File 'lib/kountries/lookup_by_code.rb', line 10

def initialize(code)
  @code = code
end

Class Method Details

.call(code:) ⇒ Object



6
7
8
# File 'lib/kountries/lookup_by_code.rb', line 6

def self.call(code:)
  new(code).call
end

Instance Method Details

#callObject



14
15
16
# File 'lib/kountries/lookup_by_code.rb', line 14

def call
  country_lookup
end