Class: CBOR::Sequence

Inherits:
Struct
  • Object
show all
Defined in:
lib/cbor-pure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#elementsObject

Returns the value of attribute elements

Returns:

  • (Object)

    the current value of elements



67
68
69
# File 'lib/cbor-pure.rb', line 67

def elements
  @elements
end

Instance Method Details

#to_cborseqObject



72
73
74
# File 'lib/cbor-pure.rb', line 72

def to_cborseq
  CBOR.encode_seq(self)
end

#to_sObject Also known as: inspect



68
69
70
# File 'lib/cbor-pure.rb', line 68

def to_s
  elements.map(&:to_s).join(", ")
end