Class: RetroIDL::ASN::BaseValue
- Inherits:
-
Object
- Object
- RetroIDL::ASN::BaseValue
- Defined in:
- lib/retro_idl/asn/base_value.rb
Overview
methods and attributes common to ASN.1 values
Instance Attribute Summary collapse
-
#governor ⇒ Object
readonly
Returns the value of attribute governor.
-
#id ⇒ String, NilClass
readonly
Identifier.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**opts) ⇒ BaseValue
constructor
A new instance of BaseValue.
-
#link(mod, stack) ⇒ MODULE?
resolve symbols to definitions in module.
Constructor Details
#initialize(**opts) ⇒ BaseValue
Returns a new instance of BaseValue.
23 24 25 |
# File 'lib/retro_idl/asn/base_value.rb', line 23 def initialize(**opts) @value = opts[:value] end |
Instance Attribute Details
#governor ⇒ Object (readonly)
Returns the value of attribute governor.
27 28 29 |
# File 'lib/retro_idl/asn/base_value.rb', line 27 def governor @governor end |
#id ⇒ String, NilClass (readonly)
Returns identifier.
30 31 32 |
# File 'lib/retro_idl/asn/base_value.rb', line 30 def id @id end |
Class Method Details
.===(otherClass) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/retro_idl/asn/base_value.rb', line 61 def self.===(otherClass) if self == otherClass true else false end end |
Instance Method Details
#link(mod, stack) ⇒ MODULE?
resolve symbols to definitions in module
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/retro_idl/asn/base_value.rb', line 33 def link(mod, stack) if @mod.nil? or @mod != mod @mod = nil if @governor.link(mod, stack.push(self)) if @governor.evaluate(value) @mod = mod else ASN.putError(@location, "evaluate didn't work") end end else @mod end end |