Class: Threatinator::Model::Observables::Ipv4

Inherits:
Base
  • Object
show all
Defined in:
lib/threatinator/model/observables/ipv4.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#validate!

Constructor Details

#initialize(opts = {}) ⇒ Ipv4

Returns a new instance of Ipv4.

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :ipv4 (IP::V4)

    An ipv4 object



22
23
24
25
# File 'lib/threatinator/model/observables/ipv4.rb', line 22

def initialize(opts = {})
  @ipv4 = opts.delete(:ipv4)
  super()
end

Instance Attribute Details

#ipv4Object (readonly)

Returns the value of attribute ipv4.



10
11
12
# File 'lib/threatinator/model/observables/ipv4.rb', line 10

def ipv4
  @ipv4
end

Instance Method Details

#to_sObject



27
28
29
# File 'lib/threatinator/model/observables/ipv4.rb', line 27

def to_s
  return ipv4.to_s
end