Class: AMF::Header
- Inherits:
-
Object
- Object
- AMF::Header
- Defined in:
- lib/amf/header.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#required ⇒ Object
Returns the value of attribute required.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#each ⇒ Object
needed this method, it is a bit of a hack.
-
#initialize(target, required, data) ⇒ Header
constructor
A new instance of Header.
- #to_hash ⇒ Object
Constructor Details
#initialize(target, required, data) ⇒ Header
Returns a new instance of Header.
5 6 7 8 9 |
# File 'lib/amf/header.rb', line 5 def initialize( target, required, data ) @target = target @required = required @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/amf/header.rb', line 3 def data @data end |
#required ⇒ Object
Returns the value of attribute required.
3 4 5 |
# File 'lib/amf/header.rb', line 3 def required @required end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/amf/header.rb', line 3 def target @target end |
Instance Method Details
#each ⇒ Object
needed this method, it is a bit of a hack
16 17 18 |
# File 'lib/amf/header.rb', line 16 def each self.to_hash.each end |
#to_hash ⇒ Object
11 12 13 |
# File 'lib/amf/header.rb', line 11 def to_hash { 'name' => self.target, 'required' => self.required, 'data' => self.data } end |