Class: OTX::Type::Base
- Inherits:
-
Object
- Object
- OTX::Type::Base
- Defined in:
- lib/otx_ruby/base.rb
Overview
Base Class for types
Direct Known Subclasses
Event, Indicator::Activity, Indicator::CVE::BaseIndicator, Indicator::CVE::General, Indicator::CVE::PulseInfo, Indicator::CVE::Reference, Indicator::CorrelationRule, Indicator::Data, Indicator::FileAnalysis, Indicator::IP::DNS, Indicator::IP::General, Indicator::IP::Geo, Indicator::IP::HTTPScan, Indicator::IP::Malware, Indicator::IP::NidsList, Indicator::IP::Reputation, Indicator::IP::URL, Indicator::IP::Whois, Indicator::IndicatorType, Indicator::Pulse::Author, Indicator::Pulse::IndicatorTypeCounts, Indicator::Pulse::Observation, Indicators, Pulse, User
Instance Attribute Summary collapse
-
#created ⇒ DateTime
Date and Time stamp for the creation of the records.
-
#id ⇒ Object
Returns the value of attribute id.
-
#modified ⇒ DateTime
Date and Time stamp for the last modification of the records.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/otx_ruby/base.rb', line 102 def initialize(attributes={}) attributes.each do |key, value| _key = key.gsub('-', '_') unless self.respond_to?(_key.downcase) self.class.send(:attr_accessor, _key.downcase) end send("#{_key.downcase}=", value) end end |
Instance Attribute Details
#created ⇒ DateTime
Date and Time stamp for the creation of the records
90 91 92 |
# File 'lib/otx_ruby/base.rb', line 90 def created @created end |
#id ⇒ Object
Returns the value of attribute id.
92 93 94 |
# File 'lib/otx_ruby/base.rb', line 92 def id @id end |
#modified ⇒ DateTime
Date and Time stamp for the last modification of the records
90 91 92 |
# File 'lib/otx_ruby/base.rb', line 90 def modified @modified end |