Exception: Stix2::Exception::InvalidRange

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

Instance Method Summary collapse

Constructor Details

#initialize(valid_range, value) ⇒ InvalidRange

Returns a new instance of InvalidRange.



121
122
123
124
# File 'lib/stix2/exception.rb', line 121

def initialize(valid_range, value)
  @valid_range = valid_range
  @value = value
end

Instance Method Details

#messageObject



126
127
128
# File 'lib/stix2/exception.rb', line 126

def message
  "Invalid value #{@value} for range #{@valid_range}"
end