class ResponseMate::Exporter

Responsible for exporting response_mate manifest to formats understood by other similar tools

Attributes

environment[RW]
format[RW]
handler[RW]
manifest[RW]
resource[RW]

Public Class Methods

new(args = {}) click to toggle source
# File lib/response_mate/exporter.rb, line 7
def initialize(args = {})
  @format      = args[:format]
  @manifest    = args[:manifest]
  @environment = args[:environment]
  @resource    = args[:resource]
end

Public Instance Methods

export() click to toggle source

Returns the compatible transformed resource

# File lib/response_mate/exporter.rb, line 15
def export
  @handler = "ResponseMate::Exporters::#{format.capitalize}".safe_constantize.new manifest,
                                                                                  environment,
                                                                                  resource
  handler.export
end