Class: Contracts::SelectByArg

Inherits:
Object
  • Object
show all
Defined in:
lib/tss/custom_contracts.rb

Class Method Summary collapse

Class Method Details

.to_sObject



90
91
92
# File 'lib/tss/custom_contracts.rb', line 90

def self.to_s
  'must be a uppercase String specifying the desired way to sample shares provided [FIRST, SAMPLE, COMBINATIONS].'
end

.valid?(val) ⇒ Boolean

Returns:

  • (Boolean)


86
87
88
# File 'lib/tss/custom_contracts.rb', line 86

def self.valid? val
  Contracts::Enum['FIRST', 'SAMPLE', 'COMBINATIONS'].valid?(val)
end