Module: OpenAssets::Protocol::OutputType

Defined in:
lib/openassets/protocol/output_type.rb

Constant Summary collapse

UNCOLORED =
0
MARKER_OUTPUT =
1
ISSUANCE =
2
TRANSFER =
3

Class Method Summary collapse

Class Method Details

.allObject

get all enum.



11
12
13
# File 'lib/openassets/protocol/output_type.rb', line 11

def self.all
  self.constants.map{|name|self.const_get(name)}
end

.output_type_label(type) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/openassets/protocol/output_type.rb', line 15

def self.output_type_label(type)
  case type
    when UNCOLORED then 'uncolored'
    when MARKER_OUTPUT then 'marker'
    when ISSUANCE then 'issuance'
    when TRANSFER then 'transfer'
    else 'uncolored'
  end
end