Class: Prmd::UrlGenerator
- Inherits:
-
Object
- Object
- Prmd::UrlGenerator
- Defined in:
- lib/prmd/url_generator.rb,
lib/prmd/url_generators/generators/json.rb,
lib/prmd/url_generators/generators/default.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Generators
Instance Method Summary collapse
-
#initialize(params) ⇒ UrlGenerator
constructor
private
A new instance of UrlGenerator.
- #url_params ⇒ Array private
Constructor Details
#initialize(params) ⇒ UrlGenerator
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of UrlGenerator.
10 11 12 13 14 |
# File 'lib/prmd/url_generator.rb', line 10 def initialize(params) @schema = params[:schema] @link = params[:link] @options = params.fetch(:options) end |
Instance Method Details
#url_params ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 22 23 24 25 |
# File 'lib/prmd/url_generator.rb', line 17 def url_params if @options[:doc][:url_style].downcase == 'json' klass = Generators::JSON else klass = Generators::Default end klass.generate(schema: @schema, link: @link) end |