class GistGenerator::Generator
Attributes
gists_params[R]
repo_path[R]
Public Class Methods
call(*args)
click to toggle source
# File lib/gist_generator.rb, line 11 def self.call(*args) new(*args).call end
new(config)
click to toggle source
# File lib/gist_generator.rb, line 15 def initialize(config) @repo_path = config.fetch(:repo_path) @gists_params = config.fetch(:gists) end
Public Instance Methods
call()
click to toggle source
# File lib/gist_generator.rb, line 20 def call gists_params.map do |params| Gist.new(params.merge(repo_path: repo_path)) end end