module Archangel
@author dfreerksen
@see Archangel
@see Archangel
Constants
Public Class Methods
config()
click to toggle source
Application configurations
Example
Archangel.config.backend_path #=> "backend" Archangel.config[:backend_path] #=> "backend" Archangel.config["backend_path"] #=> "backend"
@return [Object] application configurations
# File lib/archangel.rb, line 66 def config @config ||= Config.new end
Also aliased as: configuration
reserved_page_keywords()
click to toggle source
Reserved keywords for page slugs
This is an array keywords that are not allowed to be used for Page slugs.
Example
Archangel.reserved_page_keywords #=> ["auth", "backend", ""]
@return [Array] reserved keywords for page slugs
# File lib/archangel.rb, line 92 def reserved_page_keywords %i[auth_path backend_path frontend_path] end
themes()
click to toggle source
Available themes
Example
Archangel.themes #=> ["default"] Archangel.themes #=> ["default", "my_theme"]
@return [Array] available themes
# File lib/archangel.rb, line 79 def themes [THEME_DEFAULT] + THEMES end
translate(*args)
click to toggle source
Translate
Example
# config/locales/en.yml en: archangel: hello: Hello foo: bar: Bar Archangel.translate(:hello) #=> "Hello" Archangel.translate(:bar, scope: :foo) #=> "Bar" Archangel.t(:hello) #=> "Hello" Archangel.t(:bar, scope: :foo) #=> "Bar" I18n.t(:hello, scope: :archangel) #=> "Hello" I18n.translate(:hello, scope: :archangel) #=> "Hello"
@param args [String,Array] translation parameters @return [String] the translated string
Calls superclass method
# File lib/archangel/i18n.rb, line 35 def translate(*args) options = args.extract_options! options[:scope] = [*options[:scope]].unshift(:archangel) args << options super(*args) end
Also aliased as: t
version()
click to toggle source
Archangel
version
@return [String] current version
# File lib/archangel/version.rb, line 17 def self.version VERSION end