Module: TT
- Defined in:
- lib/t_t.rb,
lib/t_t/base.rb,
lib/t_t/rails.rb,
lib/t_t/formaters.rb,
lib/t_t/i18n_sync.rb,
lib/t_t/builtin_rules.rb,
lib/t_t/action_factory.rb
Defined Under Namespace
Modules: BuiltinRules, Formaters, Helper, Model, Utils
Classes: ActionFactory, Base, I18nSync, Railtie
Class Method Summary
collapse
Class Method Details
.base(value = nil) ⇒ Object
14
15
16
|
# File 'lib/t_t.rb', line 14
def self.base(value = nil)
@base || Base
end
|
.base=(value) ⇒ Object
18
19
20
|
# File 'lib/t_t.rb', line 18
def self.base=(value)
@base = value
end
|
.config(*args, &block) ⇒ Object
10
11
12
|
# File 'lib/t_t.rb', line 10
def self.config(*args, &block)
base.config(*args, &block)
end
|
.const_missing(name) ⇒ Object
33
34
35
36
37
38
|
# File 'lib/t_t.rb', line 33
def self.const_missing(name)
super unless name.to_s == 'Translator'
puts ""
puts "t_t: TT::Translator is deprecated. Please, use #{ base } instead"
base
end
|
.define_actions(*args) {|f| ... } ⇒ Object
26
27
28
29
30
31
|
# File 'lib/t_t.rb', line 26
def self.define_actions(*args)
require "t_t/action_factory"
f = ActionFactory.new(*args)
yield f
f.as_hash
end
|
.fork(*args, &block) ⇒ Object
4
5
6
7
8
|
# File 'lib/t_t.rb', line 4
def self.fork(*args, &block)
klass = Class.new(Base)
klass.config(*args, &block)
klass
end
|
.raise_error(base) ⇒ Object
22
23
24
|
# File 'lib/t_t.rb', line 22
def self.raise_error(base)
raise ArgumentError, "t_t: #{ base }"
end
|