Exception: MdxTex::ToTextile::InvalidListDepthError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/mdx_tex/to_textile/errors.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ InvalidListDepthError

Returns a new instance of InvalidListDepthError.



8
9
10
# File 'lib/mdx_tex/to_textile/errors.rb', line 8

def initialize(value)
  super("list_depth must be a positive integer, got: #{value.inspect}")
end

Class Method Details

.validate!(value) ⇒ Object

Raises:

  • (self)


12
13
14
# File 'lib/mdx_tex/to_textile/errors.rb', line 12

def self.validate!(value)
  raise self, value unless value.is_a?(Integer) && value.positive?
end