Module: Interpret
- Defined in:
- lib/interpret.rb,
lib/interpret/engine.rb,
lib/interpret/logger.rb,
lib/interpret/helpers.rb,
lib/interpret/version.rb,
app/models/interpret/ability.rb,
app/models/interpret/translation.rb,
app/models/interpret/expiration_observer.rb,
app/controllers/interpret/translations_controller.rb
Defined Under Namespace
Modules: InterpretHelpers
Classes: Ability, BaseController, Engine, ExpirationObserver, InterpretLogger, MissingTranslationsController, SearchController, ToolsController, Translation, TranslationsController
Constant Summary
collapse
- VERSION =
"1.0.0"
- @@parent_controller =
"application_controller"
- @@registered_envs =
[:production, :staging]
- @@layout =
"interpret_base"
- @@soft =
false
- @@black_list =
[]
- @@current_user =
"current_user"
- @@ability =
"interpret/ability"
Class Method Summary
collapse
Class Method Details
.ability ⇒ Object
37
38
39
40
41
42
43
|
# File 'lib/interpret.rb', line 37
def self.ability
unless @@ability.is_a?(Class)
@@ability.classify.constantize
else
@@ability
end
end
|
25
26
27
|
# File 'lib/interpret.rb', line 25
def self.configure
yield self
end
|
.fixed_blacklist ⇒ Object
29
30
31
|
# File 'lib/interpret.rb', line 29
def self.fixed_blacklist
@@black_list.select{|x| !x.include?("*")}
end
|
.wild_blacklist ⇒ Object
33
34
35
|
# File 'lib/interpret.rb', line 33
def self.wild_blacklist
@@black_list.select{|x| x.include?("*")}.map{|x| x.gsub("*", "")}
end
|