Class: NNEClient::Ownership

Inherits:
Object
  • Object
show all
Defined in:
lib/nne_client/record_types/ownership.rb

Instance Method Summary collapse

Constructor Details

#initialize(ownership_hash) ⇒ Ownership

Returns a new instance of Ownership.



7
8
9
# File 'lib/nne_client/record_types/ownership.rb', line 7

def initialize(ownership_hash)
  @hash = ownership_hash
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
18
19
# File 'lib/nne_client/record_types/ownership.rb', line 15

def ==(other)
  share == other.share &&
    name == other.name &&
    country == other.country
end

#companyObject



21
22
23
# File 'lib/nne_client/record_types/ownership.rb', line 21

def company
  Result.new(:tdc_id => @hash[:tdc_id])
end

#shareObject



11
12
13
# File 'lib/nne_client/record_types/ownership.rb', line 11

def share
  @hash[:share].strip
end