Exception: Sperm::NoSuitableGroup

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/sperm/exceptions.rb

Overview

This runtime error appears when requested permutation order is bigger than maximum group order in known set of cyclic groups.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ NoSuitableGroup

Returns a new instance of NoSuitableGroup



8
9
10
# File 'lib/sperm/exceptions.rb', line 8

def initialize(order)
  @order = order
end

Instance Attribute Details

#orderObject (readonly)

Returns the value of attribute order



6
7
8
# File 'lib/sperm/exceptions.rb', line 6

def order
  @order
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/sperm/exceptions.rb', line 12

def to_s
  "no suitable group for permutation of order #{order} found"
end