Class: Grape::ClientGenerator::Ruby::RubyGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/grape/client-generator/ruby/ruby_generator.rb

Constant Summary

Constants inherited from Generator

Generator::DEFAULT_CLASS_NAME, Generator::DEFAULT_RESPONSE_TYPES, Generator::DEFAULT_VERSION

Instance Attribute Summary

Attributes inherited from Generator

#class_name, #default_version, #grape_classes, #namespace, #response_types

Instance Method Summary collapse

Methods inherited from Generator

#each_endpoint, #initialize, #map_endpoints

Constructor Details

This class inherits a constructor from Grape::ClientGenerator::Generator

Instance Method Details

#generate_eachObject



8
9
10
11
12
13
# File 'lib/grape/client-generator/ruby/ruby_generator.rb', line 8

def generate_each
  client_file_classes.each do |klass|
    client_file = klass.new(self)
    yield client_file.output_file_name, client_file.render
  end
end