Class: Samwise::DunsLookup

Inherits:
Object
  • Object
show all
Defined in:
lib/samwise/duns_lookup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ DunsLookup

Returns a new instance of DunsLookup.



5
6
7
# File 'lib/samwise/duns_lookup.rb', line 5

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/samwise/duns_lookup.rb', line 3

def response
  @response
end

Instance Method Details

#small_business?Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
15
# File 'lib/samwise/duns_lookup.rb', line 9

def small_business?
  if response.status == 200
    small_business_response
  else
    false
  end
end