Class: Ordinals::Api::Content
- Inherits:
-
Object
- Object
- Ordinals::Api::Content
- Defined in:
- lib/ordinals/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
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
#data ⇒ Object (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 |
#length ⇒ Object (readonly)
Returns the value of attribute length.
40 41 42 |
# File 'lib/ordinals/api.rb', line 40 def length @length end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
40 41 42 |
# File 'lib/ordinals/api.rb', line 40 def type @type end |