Class: MISP::GalaxyCluster
Instance Attribute Summary collapse
- #authors ⇒ Array<String> readonly
- #description ⇒ String readonly
- #galaxy_id ⇒ String readonly
- #id ⇒ String readonly
- #meta ⇒ Hash readonly
- #source ⇒ String readonly
- #tag_id ⇒ String readonly
- #tag_name ⇒ String readonly
- #type ⇒ String readonly
- #uuid ⇒ String readonly
- #value ⇒ String readonly
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ GalaxyCluster
constructor
A new instance of GalaxyCluster.
-
#to_h ⇒ Hash
Returns a hash representation of the attribute data.
Constructor Details
#initialize(**attributes) ⇒ GalaxyCluster
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/misp/galaxy_cluster.rb', line 28 def initialize(**attributes) attributes = normalize_attributes(**attributes) @id = attributes[:id] @uuid = attributes[:uuid] @type = attributes[:type] @value = attributes[:value] @tag_name = attributes[:tag_name] @description = attributes[:description] @galaxy_id = attributes[:galaxy_id] @source = attributes[:source] = attributes[:authors] @tag_id = attributes[:tag_id] = attributes[:meta] end |
Instance Attribute Details
#authors ⇒ Array<String> (readonly)
22 23 24 |
# File 'lib/misp/galaxy_cluster.rb', line 22 def end |
#description ⇒ String (readonly)
16 17 18 |
# File 'lib/misp/galaxy_cluster.rb', line 16 def description @description end |
#galaxy_id ⇒ String (readonly)
18 19 20 |
# File 'lib/misp/galaxy_cluster.rb', line 18 def galaxy_id @galaxy_id end |
#id ⇒ String (readonly)
6 7 8 |
# File 'lib/misp/galaxy_cluster.rb', line 6 def id @id end |
#meta ⇒ Hash (readonly)
26 27 28 |
# File 'lib/misp/galaxy_cluster.rb', line 26 def end |
#source ⇒ String (readonly)
20 21 22 |
# File 'lib/misp/galaxy_cluster.rb', line 20 def source @source end |
#tag_id ⇒ String (readonly)
24 25 26 |
# File 'lib/misp/galaxy_cluster.rb', line 24 def tag_id @tag_id end |
#tag_name ⇒ String (readonly)
14 15 16 |
# File 'lib/misp/galaxy_cluster.rb', line 14 def tag_name @tag_name end |
#type ⇒ String (readonly)
10 11 12 |
# File 'lib/misp/galaxy_cluster.rb', line 10 def type @type end |
#uuid ⇒ String (readonly)
8 9 10 |
# File 'lib/misp/galaxy_cluster.rb', line 8 def uuid @uuid end |
#value ⇒ String (readonly)
12 13 14 |
# File 'lib/misp/galaxy_cluster.rb', line 12 def value @value end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of the attribute data.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/misp/galaxy_cluster.rb', line 49 def to_h { id: id, uuid: uuid, type: type, value: value, tag_name: tag_name, description: description, galaxy_id: galaxy_id, source: source, authors: , tag_id: tag_id, meta: , }.compact end |