Sha256: 2268df831106e613435402ccbd4571c92ab9c99f704c8c9fa085a5d173ea2a92
Contents?: true
Size: 606 Bytes
Versions: 8
Compression:
Stored size: 606 Bytes
Contents
# frozen_string_literal: true class BCDD::Result class Data attr_reader :kind, :type, :value def initialize(kind, type, value) @kind = kind @type = type.to_sym @value = value end def to_h { kind: kind, type: type, value: value } end def to_a [kind, type, value] end def inspect format( '#<%<class_name>s kind=%<kind>p type=%<type>p value=%<value>p>', class_name: self.class.name, kind: kind, type: type, value: value ) end alias to_ary to_a alias to_hash to_h end private_constant :Data end
Version data entries
8 entries across 8 versions & 1 rubygems