Module: RASN1::Types::Constrained
- Extended by:
- ClassMethods
- Defined in:
- lib/rasn1/types/constrained.rb
Overview
Mixin to add constraints on a RASN1 type. Should not be used directly but through define_type.
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary
Attributes included from ClassMethods
Instance Method Summary collapse
-
#der_to_value(der, ber: false) ⇒ void
Make value from
derstring and check constraints. -
#value=(val) ⇒ Object
Redefined
#value=to check constraint before assigningval.
Methods included from ClassMethods
check_constraint, constrained?
Instance Method Details
#der_to_value(der, ber: false) ⇒ void
This method returns an undefined value.
Make value from der string and check constraints
51 52 53 54 |
# File 'lib/rasn1/types/constrained.rb', line 51 def der_to_value(der, ber: false) super self.class.check_constraint(@value) end |
#value=(val) ⇒ Object
Redefined #value= to check constraint before assigning val
41 42 43 44 |
# File 'lib/rasn1/types/constrained.rb', line 41 def value=(val) self.class.check_constraint(val) super end |