Class: Platform::Generators::ProxyGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/platform/proxy_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_proxy_fileObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/generators/platform/proxy_generator.rb', line 33

def create_proxy_file
  create_file "#{Platform::Config.api_proxies_path}/#{file_name}_proxy_#{version}.rb", %Q{module Api
  module Proxy
    class #{class_name}Proxy_#{version} < Platform::Api::Proxy::Base
proxy_for(#{proxy_class})

def to_api_hash(options={})
  {#{attributes}}
end

    end
  end
end
}        
end