Module: CompaniesHouse

Defined in:
lib/companies_house.rb,
lib/companies_house/request.rb,
lib/companies_house/version.rb,
lib/companies_house/response.rb

Defined Under Namespace

Classes: CompanyNotFound, InvalidRegistration, Request, Response, ServerError

Constant Summary collapse

VERSION =
'0.2.5'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.cacheObject

Returns the value of attribute cache.



32
33
34
# File 'lib/companies_house.rb', line 32

def cache
  @cache
end

.cache_argsObject

Returns the value of attribute cache_args.



32
33
34
# File 'lib/companies_house.rb', line 32

def cache_args
  @cache_args
end

Class Method Details

.lookup(registration_number) ⇒ Object

Public API

Usage: company = CompaniesHouse.lookup “07495895”

> #<CompaniesHouse:0x00000100932870 @registration_number=“07495895”… >

company

> “GOCARDLESS LTD”



28
29
30
# File 'lib/companies_house.rb', line 28

def lookup(registration_number)
  Request.new(registration_number).perform
end