Module: CubaApi::Aspects
- Defined in:
- lib/cuba_api/aspects.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#write(obj, options = {}) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/cuba_api/aspects.rb', line 48 def write( obj, = {} ) self.res.status = [:status] || 200 # make sure we inherit aspects and repsect the order aspects = self.class[ :aspects ] # == CubaAPI ? [] : self.class.superclass[ :aspects ] (aspects + self.class[ :aspects ]).uniq.each do |w| obj = send( w, obj, ) if obj end res.write obj.to_s end |