Exception: Stix2::Exception::BadType

Inherits:
Base
  • Object
show all
Defined in:
lib/stix2/exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ BadType

Returns a new instance of BadType.



27
28
29
# File 'lib/stix2/exception.rb', line 27

def initialize(type)
  @type = type
end

Instance Method Details

#messageObject



31
32
33
# File 'lib/stix2/exception.rb', line 31

def message
  "Property 'type' must be '#{@type}'"
end