Module: TinyZap

Defined in:
lib/tinyzap.rb,
lib/tinyzap/cli.rb,
lib/tinyzap/client.rb,
lib/tinyzap/engine.rb,
lib/tinyzap/version.rb,
lib/tinyzap/configuration.rb,
lib/tinyzap/key_generator.rb,
lib/tinyzap/url_signature.rb,
app/jobs/tinyzap/application_job.rb,
app/models/tinyzap/open_graph/base.rb,
app/models/tinyzap/open_graph/image.rb,
app/models/tinyzap/open_graph/model.rb,
app/models/tinyzap/application_record.rb,
app/models/tinyzap/open_graph/metatag.rb,
app/models/tinyzap/open_graph/twitter.rb,
app/helpers/tinyzap/application_helper.rb,
app/mailers/tinyzap/application_mailer.rb,
app/helpers/tinyzap/open_graph_tag_helper.rb,
app/controllers/concerns/tinyzap/open_graph.rb,
app/models/tinyzap/open_graph/metatag_mapper.rb,
app/controllers/tinyzap/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, OpenGraph, OpenGraphTagHelper Classes: ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, CLI, Client, Configuration, Engine, InstallGenerator, KeyGenerator, UrlSignature

Constant Summary collapse

Loader =
Zeitwerk::Loader.for_gem.tap do |loader|
  loader.ignore "#{__dir__}/generators"
  loader.inflector.inflect(
    "tinyzap" => "TinyZap",
    "cli" => "CLI"
  )
  loader.setup
end
VERSION =
"0.1.4"

Class Method Summary collapse

Class Method Details

.clientObject



16
17
18
# File 'lib/tinyzap.rb', line 16

def client
  @client ||= Client.new
end

.configure(&block) ⇒ Object



24
25
26
# File 'lib/tinyzap.rb', line 24

def configure(&block)
  block.call client.configuration
end

.key_generator(environment: Rails.env) ⇒ Object



20
21
22
# File 'lib/tinyzap.rb', line 20

def key_generator(environment: Rails.env)
  @key_generator ||= KeyGenerator.new(environment: environment)
end