Class: Melos::Struct::ProposalOrRef

Inherits:
Base
  • Object
show all
Defined in:
lib/melos/struct/structs.rb

Overview

12.4

Constant Summary collapse

STRUCT =
[
  [:type, :uint8],
  [:proposal, :select,  ->(ctx){ctx[:type] == Melos::Constants::ProposalOrRefType::PROPOSAL}, :class, Melos::Struct::Proposal],
  [:reference, :select, ->(ctx){ctx[:type] == Melos::Constants::ProposalOrRefType::REFERENCE}, :vec] # ProposalRef is a HashReference, which is a :vec
]

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#deserialize_select_elem_with_context, #initialize, #raw

Constructor Details

This class inherits a constructor from Melos::Struct::Base

Instance Attribute Details

#proposalObject (readonly)

Returns the value of attribute proposal.



460
461
462
# File 'lib/melos/struct/structs.rb', line 460

def proposal
  @proposal
end

#referenceObject (readonly)

Returns the value of attribute reference.



460
461
462
# File 'lib/melos/struct/structs.rb', line 460

def reference
  @reference
end

#typeObject (readonly)

Returns the value of attribute type.



460
461
462
# File 'lib/melos/struct/structs.rb', line 460

def type
  @type
end