Class: Scale::Types::MetadataV0Event
- Inherits:
-
Object
- Object
- Scale::Types::MetadataV0Event
- Includes:
- Base
- Defined in:
- lib/metadata/metadata_v0.rb
Instance Attribute Summary
Attributes included from Base
Class Method Summary collapse
Methods included from Base
#==, included, #initialize, #to_human
Class Method Details
.decode(scale_bytes) ⇒ Object
83 84 85 86 87 88 |
# File 'lib/metadata/metadata_v0.rb', line 83 def self.decode(scale_bytes) name = Bytes.decode(scale_bytes).value args = Scale::Types.get("Vec<Bytes>").decode(scale_bytes).value.map(&:value) documentation = Scale::Types.get("Vec<Bytes>").decode(scale_bytes).value.map(&:value) MetadataV0Event.new({name: name, args: args.map {|arg| arg }, documentation: documentation}) end |