Class: MISP::Orgc

Inherits:
Base
  • Object
show all
Defined in:
lib/misp/orgc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**attributes) ⇒ Orgc



12
13
14
15
16
17
18
# File 'lib/misp/orgc.rb', line 12

def initialize(**attributes)
  attributes = normalize_attributes(**attributes)

  @id = attributes[:id]
  @name = attributes[:name]
  @uuid = attributes[:uuid]
end

Instance Attribute Details

#idString (readonly)



6
7
8
# File 'lib/misp/orgc.rb', line 6

def id
  @id
end

#nameString (readonly)



8
9
10
# File 'lib/misp/orgc.rb', line 8

def name
  @name
end

#uuidString (readonly)



10
11
12
# File 'lib/misp/orgc.rb', line 10

def uuid
  @uuid
end

Instance Method Details

#to_hHash

Returns a hash representation of the attribute data.



25
26
27
28
29
30
31
# File 'lib/misp/orgc.rb', line 25

def to_h
  {
    id: id,
    name: name,
    uuid: uuid,
  }.compact
end