Class: Grape::ClientGenerator::Ruby::Api
Instance Attribute Summary
Attributes inherited from ClientFile
#generator
Instance Method Summary
collapse
Methods inherited from ClientFile
#initialize, #render
Instance Method Details
49
50
51
|
# File 'lib/grape/client-generator/ruby/files.rb', line 49
def input_file
mustache_file_for("api")
end
|
#output_file_name ⇒ Object
45
46
47
|
# File 'lib/grape/client-generator/ruby/files.rb', line 45
def output_file_name
"api.rb"
end
|
#params ⇒ Object
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/grape/client-generator/ruby/files.rb', line 53
def params
{
:namespace => generator.namespace,
:class_name => generator.class_name,
:default_version => generator.default_version,
:default_format => generator.response_types.first,
:endpoints => generator.map_endpoints do |endpoint|
{
:path => route_options_for(endpoint)[:path],
:path_params => route_options_for(endpoint)[:params].keys,
:name => endpoint.settings[:name], :verb => endpoint.options[:method].first.downcase
}
end
}
end
|