Class: OTX::Pulse
- Inherits:
-
Type::Base
- Object
- Type::Base
- OTX::Pulse
- Defined in:
- lib/otx_ruby/types/pulse.rb
Overview
AlienVault OTX Pulse Record
Instance Attribute Summary collapse
-
#adversary ⇒ String
The current value of adversary.
-
#author_name ⇒ String
Name of the pulse author_name.
-
#description ⇒ String
Description of the pulse.
-
#group_id ⇒ String
The current value of group_id.
-
#group_name ⇒ String
The current value of group_name.
-
#groups ⇒ Array<String>
The current value of groups.
-
#id ⇒ String
OTX ID value for the pulse Record.
-
#in_group ⇒ Boolean
The current value of in_group.
-
#indicators ⇒ Array<OTX::Indicators>
Array of the IoC attached to the OTX pulse.
-
#industries ⇒ Array<String>
The current value of industries.
-
#name ⇒ String
Pulse Name.
-
#public ⇒ Boolean
Privacy setting.
-
#references ⇒ Object
Returns the value of attribute references.
-
#referenes ⇒ Array<String>
Array of references attached to the pulse.
-
#revision ⇒ String
Revision number of the OTX Pulse Record.
-
#tags ⇒ Array<String>
Array of ‘tags’ to describe the pulse.
-
#targeted_countries ⇒ Array<String>
The current value of targeted_countries.
-
#tlp ⇒ String
Traffic light protocol color as appropriate to U.S.
Attributes inherited from Type::Base
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Pulse
constructor
A new instance of Pulse.
Constructor Details
#initialize(attributes = {}) ⇒ Pulse
Returns a new instance of Pulse.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/otx_ruby/types/pulse.rb', line 30 def initialize(attributes={}) attributes.each do |key, value| # Dynamically Add any missing attributes unless self.respond_to?(key) self.class.send(:attr_accessor, key) end if key == 'indicators' @indicators = [] value.each do |indicator| @indicators << OTX::Indicators.new(indicator) end elsif key == 'observation' @observation = OTX::Indicator::Pulse::Observation.new(value) elsif key == 'indicator_type_counts' @indicator_type_counts = OTX::Indicator::Pulse::IndicatorTypeCounts.new(value) elsif key == 'author' @author = OTX::Indicator::Pulse::Author.new(value) else send("#{key.downcase}=", value) end end end |
Instance Attribute Details
#adversary ⇒ String
Returns the current value of adversary.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def adversary @adversary end |
#author_name ⇒ String
Name of the pulse author_name
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def @author_name end |
#description ⇒ String
Description of the pulse
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def description @description end |
#group_id ⇒ String
Returns the current value of group_id.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def group_id @group_id end |
#group_name ⇒ String
Returns the current value of group_name.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def group_name @group_name end |
#groups ⇒ Array<String>
Returns the current value of groups.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def groups @groups end |
#id ⇒ String
OTX ID value for the pulse Record
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def id @id end |
#in_group ⇒ Boolean
Returns the current value of in_group.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def in_group @in_group end |
#indicators ⇒ Array<OTX::Indicators>
Array of the IoC attached to the OTX pulse
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def indicators @indicators end |
#industries ⇒ Array<String>
Returns the current value of industries.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def industries @industries end |
#name ⇒ String
Pulse Name
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def name @name end |
#public ⇒ Boolean
Privacy setting
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def public @public end |
#references ⇒ Object
Returns the value of attribute references.
25 26 27 |
# File 'lib/otx_ruby/types/pulse.rb', line 25 def references @references end |
#referenes ⇒ Array<String>
Array of references attached to the pulse
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def referenes @referenes end |
#revision ⇒ String
Revision number of the OTX Pulse Record
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def revision @revision end |
#tags ⇒ Array<String>
Array of ‘tags’ to describe the pulse
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def @tags end |
#targeted_countries ⇒ Array<String>
Returns the current value of targeted_countries.
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def targeted_countries @targeted_countries end |
#tlp ⇒ String
Traffic light protocol color as appropriate to U.S. DHS
24 25 26 |
# File 'lib/otx_ruby/types/pulse.rb', line 24 def tlp @tlp end |