Class: Blockhead::Marshaller
- Inherits:
- BasicObject
- Defined in:
- lib/blockhead/marshaller.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(object) ⇒ Marshaller
constructor
A new instance of Marshaller.
- #marshal ⇒ Object
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(object) ⇒ Marshaller
Returns a new instance of Marshaller.
5 6 7 8 |
# File 'lib/blockhead/marshaller.rb', line 5 def initialize(object) @attributes = {} @object = object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/blockhead/marshaller.rb', line 3 def attributes @attributes end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
3 4 5 |
# File 'lib/blockhead/marshaller.rb', line 3 def object @object end |
Instance Method Details
#marshal ⇒ Object
10 11 12 |
# File 'lib/blockhead/marshaller.rb', line 10 def marshal attributes end |