Class: Ethscribe::Api::Content
- Inherits:
-
Object
- Object
- Ethscribe::Api::Content
- Defined in:
- lib/ethscribe/api.rb
Overview
use a struct-like content class - why? why not?
Instance Attribute Summary collapse
-
#data ⇒ Object
(also: #blob)
readonly
Returns the value of attribute data.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data, type, length) ⇒ Content
constructor
A new instance of Content.
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
#data ⇒ Object (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 |
#length ⇒ Object (readonly)
Returns the value of attribute length.
158 159 160 |
# File 'lib/ethscribe/api.rb', line 158 def length @length end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
158 159 160 |
# File 'lib/ethscribe/api.rb', line 158 def type @type end |