Class: CLTypeTag
- Inherits:
-
Object
- Object
- CLTypeTag
- Defined in:
- lib/types/cl_type_tag.rb
Constant Summary collapse
- TAGS =
{ Bool: 0, I32: 1, I64: 2, U8: 3, U32: 4, U64: 5, U128: 6, U256: 7, U512: 8, Unit: 9, String: 10, Key: 11, URef: 12, Option: 13, List: 14, ByteArray: 15, Result: 16, Map: 17, Tuple1: 18, Tuple2: 19, Tuple3: 20, Any: 21, PublicKey: 22 }
Instance Method Summary collapse
- #get_tag_name ⇒ String
-
#get_tag_value ⇒ Integer
Tag_value.
-
#initialize(tag_value) ⇒ CLTypeTag
constructor
Constructor.
-
#tag_value_isvalid(tag_value) ⇒ Boolean
True or false.
Constructor Details
#initialize(tag_value) ⇒ CLTypeTag
Constructor
31 32 33 |
# File 'lib/types/cl_type_tag.rb', line 31 def initialize(tag_value) @tag_value = tag_value end |
Instance Method Details
#get_tag_name ⇒ String
48 49 50 |
# File 'lib/types/cl_type_tag.rb', line 48 def get_tag_name TAGS.key(@tag_value).to_s end |
#get_tag_value ⇒ Integer
Returns tag_value.
43 44 45 |
# File 'lib/types/cl_type_tag.rb', line 43 def get_tag_value @tag_value end |