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

Returns a new instance of Content.



53
54
55
56
57
# File 'lib/ordinals/api.rb', line 53

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.



50
51
52
# File 'lib/ordinals/api.rb', line 50

def data
  @data
end

#lengthObject (readonly)

Returns the value of attribute length.



50
51
52
# File 'lib/ordinals/api.rb', line 50

def length
  @length
end

#typeObject (readonly)

Returns the value of attribute type.



50
51
52
# File 'lib/ordinals/api.rb', line 50

def type
  @type
end