Class: Ethscribe::Api::Content

Inherits:
Object
  • Object
show all
Defined in:
lib/ethscribe/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.



161
162
163
164
165
# File 'lib/ethscribe/api.rb', line 161

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.



158
159
160
# File 'lib/ethscribe/api.rb', line 158

def data
  @data
end

#lengthObject (readonly)

Returns the value of attribute length.



158
159
160
# File 'lib/ethscribe/api.rb', line 158

def length
  @length
end

#typeObject (readonly)

Returns the value of attribute type.



158
159
160
# File 'lib/ethscribe/api.rb', line 158

def type
  @type
end