Class: Stix2::MetaObject::DataMarking::ObjectMarking
- Inherits:
-
Object
- Object
- Stix2::MetaObject::DataMarking::ObjectMarking
- Defined in:
- lib/stix2/meta_objects/data_markings/object_marking.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ ObjectMarking
constructor
A new instance of ObjectMarking.
- #pretty_print(pp) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ ObjectMarking
Returns a new instance of ObjectMarking.
5 6 7 8 |
# File 'lib/stix2/meta_objects/data_markings/object_marking.rb', line 5 def initialize(value) value.match(/marking-definition--.*/) || raise("Invalid value: #{value}") @value = value end |
Instance Method Details
#pretty_print(pp) ⇒ Object
14 15 16 17 18 |
# File 'lib/stix2/meta_objects/data_markings/object_marking.rb', line 14 def pretty_print(pp) # :nocov: pp.text(@value.inspect) # :nocov end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/stix2/meta_objects/data_markings/object_marking.rb', line 10 def to_s @value end |