Sha256: 786de046f9ad706bb8ab9a7557c91a31fb85df2a9848d920463d63d9c970b57a

Contents?: true

Size: 810 Bytes

Versions: 4

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

module <%= @namespace %>
  module Modules
    # <%= description %>
    #
    # The "submodule" (MediaWiki API term) is included in action after setting some param, providing
    # additional tweaking for this param. Example (for {<%= @namespace %>::Actions::Query} and
    # its submodules):
    #
    # ```ruby
    # api.query             # returns Actions::Query
    #    .prop(:revisions)  # adds prop=revisions to action URL, and includes Modules::Revisions into action
    #    .limit(10)         # method of Modules::Revisions, adds rvlimit=10 to URL
    # ```
    #
    # All submodule's parameters are documented as its public methods, see below.
    #
    module <%= class_name %>
<% params.each { |param| %><%= partial '_param_method', param %><% } %>    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mediawiktory-0.1.3 lib/mediawiktory/generator/templates/module_class.rb.erb
mediawiktory-0.1.2 lib/mediawiktory/generator/templates/module_class.rb.erb
mediawiktory-0.1.1 lib/mediawiktory/generator/templates/module_class.rb.erb
mediawiktory-0.1.0 lib/mediawiktory/generator/templates/module_class.rb.erb