Class: Ordinals::Api::Content

Inherits:
Object
  • Object
show all
Defined in:
lib/ordinals/api.rb

Overview

use a struct-like content class - why? why not?

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, type, length) ⇒ Content



43
44
45
46
47
# File 'lib/ordinals/api.rb', line 43

def initialize( data, type, length )
  @data   = data
  @type   = type
  @length = length
end

Instance Attribute Details

#dataObject (readonly) Also known as: blob

Returns the value of attribute data.



40
41
42
# File 'lib/ordinals/api.rb', line 40

def data
  @data
end

#lengthObject (readonly)

Returns the value of attribute length.



40
41
42
# File 'lib/ordinals/api.rb', line 40

def length
  @length
end

#typeObject (readonly)

Returns the value of attribute type.



40
41
42
# File 'lib/ordinals/api.rb', line 40

def type
  @type
end