Module: Attentive::Config
- Included in:
- Attentive
- Defined in:
- lib/attentive/config.rb
Instance Attribute Summary collapse
-
#default_prohibited_contexts ⇒ Object
Returns the value of attribute default_prohibited_contexts.
-
#default_required_contexts ⇒ Object
Returns the value of attribute default_required_contexts.
-
#invocations ⇒ Object
Returns the value of attribute invocations.
Instance Method Summary collapse
Instance Attribute Details
#default_prohibited_contexts ⇒ Object
Returns the value of attribute default_prohibited_contexts.
8 9 10 |
# File 'lib/attentive/config.rb', line 8 def default_prohibited_contexts @default_prohibited_contexts end |
#default_required_contexts ⇒ Object
Returns the value of attribute default_required_contexts.
7 8 9 |
# File 'lib/attentive/config.rb', line 7 def default_required_contexts @default_required_contexts end |
#invocations ⇒ Object
Returns the value of attribute invocations.
6 7 8 |
# File 'lib/attentive/config.rb', line 6 def invocations @invocations end |
Instance Method Details
#substitutions ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/attentive/config.rb', line 15 def substitutions return @substitutions if defined?(@substitutions) @substitutions = Attentive::Trie.of_substitutions( Attentive::SUBSTITUTIONS.merge( invocations.each_with_object({}) { |invocation, hash| tokens = Attentive.tokenize(invocation, substitutions: false) hash[tokens] = [Attentive::Tokens::Invocation.new(invocation, 0)] } ) ) end |