Class: Simplifyapi::Representation
- Inherits:
-
Object
- Object
- Simplifyapi::Representation
- Defined in:
- lib/simplifyapi/representation.rb
Instance Method Summary collapse
- #export(representer, model) ⇒ Object
- #import(representer, model, hash) ⇒ Object
-
#initialize(&block) ⇒ Representation
constructor
A new instance of Representation.
Constructor Details
#initialize(&block) ⇒ Representation
Returns a new instance of Representation.
7 8 9 10 |
# File 'lib/simplifyapi/representation.rb', line 7 def initialize &block @builder = Builder.new &block @importer = Importer.new &block end |
Instance Method Details
#export(representer, model) ⇒ Object
12 13 14 |
# File 'lib/simplifyapi/representation.rb', line 12 def export representer, model @builder.export representer, model end |
#import(representer, model, hash) ⇒ Object
16 17 18 19 20 |
# File 'lib/simplifyapi/representation.rb', line 16 def import representer, model, hash @importer.import representer, model, hash model end |