Class: RubyARES::Subject

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-ares/subject.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ic, dic, name, status, addresses, updated_at) ⇒ Subject

Returns a new instance of Subject.



22
23
24
25
26
27
28
29
# File 'lib/ruby-ares/subject.rb', line 22

def initialize(ic, dic, name, status, addresses, updated_at)
  @ic, @ico = ic, ic
  @dic = dic
  @name, @company = name
  @status = status
  @addresses = addresses
  @updated_at = updated_at
end

Instance Attribute Details

#addressesObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def addresses
  @addresses
end

#companyObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def company
  @company
end

#dicObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def dic
  @dic
end

#icObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def ic
  @ic
end

#icoObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def ico
  @ico
end

#nameObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def name
  @name
end

#statusObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def status
  @status
end

#updated_atObject (readonly)

ICO



8
9
10
# File 'lib/ruby-ares/subject.rb', line 8

def updated_at
  @updated_at
end

Class Method Details

.get(ic) ⇒ Object



17
18
19
20
# File 'lib/ruby-ares/subject.rb', line 17

def self.get(ic)
  xml = RubyARES::HTTP.fetch_subject_xml ic
  RubyARES::Parser.get_subject xml
end

Instance Method Details

#addressObject



31
32
33
# File 'lib/ruby-ares/subject.rb', line 31

def address
  @addresses[0]
end