Class: Melos::Struct::ProposalOrRef
- 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
-
#proposal ⇒ Object
readonly
Returns the value of attribute proposal.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
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
#proposal ⇒ Object (readonly)
Returns the value of attribute proposal.
460 461 462 |
# File 'lib/melos/struct/structs.rb', line 460 def proposal @proposal end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
460 461 462 |
# File 'lib/melos/struct/structs.rb', line 460 def reference @reference end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
460 461 462 |
# File 'lib/melos/struct/structs.rb', line 460 def type @type end |