Class: Rtype::Behavior::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rtype/behavior/base.rb

Direct Known Subclasses

And, Nilable, Not, NumericCheck, TypedArray, TypedHash, TypedSet, Xor

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](*vals) ⇒ Object



4
5
6
# File 'lib/rtype/behavior/base.rb', line 4

def self.[](*vals)
	new(*vals)
end

Instance Method Details

#error_message(value) ⇒ Object

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/rtype/behavior/base.rb', line 12

def error_message(value)
	raise NotImplementedError, "Abstract method"
end

#valid?(value) ⇒ Boolean

Returns:

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/rtype/behavior/base.rb', line 8

def valid?(value)
	raise NotImplementedError, "Abstract method"
end