module Rpictogrify

Constants

VERSION

Public Class Methods

assets_path() click to toggle source
# File lib/rpictogrify.rb, line 35
def assets_path
  @assets_path ||= root.join('assets')
end
config() click to toggle source
# File lib/rpictogrify.rb, line 23
def config
  @config ||= Configuration.new
end
configure(&block) click to toggle source
# File lib/rpictogrify.rb, line 27
def configure(&block)
  config.instance_exec(&block)
end
generate(text, options = {}) click to toggle source

example

Rpictogrify.generate 'jim', theme: :avataars_male
# File lib/rpictogrify.rb, line 19
def generate(text, options = {})
  Generator.call(text, options)
end
path_to_url(path) click to toggle source
# File lib/rpictogrify.rb, line 43
def path_to_url(path)
  path.to_s.sub('public/', '/')
end
root() click to toggle source
# File lib/rpictogrify.rb, line 31
def root
  @root ||= Pathname.new(File.expand_path('../..', __FILE__))
end
themes_assets_path() click to toggle source
# File lib/rpictogrify.rb, line 39
def themes_assets_path
  @themes_assets_path ||= assets_path.join('themes')
end