Class: Dingtalk::Robot::Configurable::Configuration
- Inherits:
-
Object
- Object
- Dingtalk::Robot::Configurable::Configuration
- Defined in:
- lib/dingtalk/robot/configurable.rb
Overview
Instance Attribute Summary collapse
-
#message_type ⇒ Object
Returns the value of attribute message_type.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #template_dir ⇒ Object
- #template_dir=(template_dir) ⇒ Object
- #tokens ⇒ Object
- #tokens=(tokens) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
36 37 38 |
# File 'lib/dingtalk/robot/configurable.rb', line 36 def initialize self. = :text end |
Instance Attribute Details
#message_type ⇒ Object
Returns the value of attribute message_type.
34 35 36 |
# File 'lib/dingtalk/robot/configurable.rb', line 34 def @message_type end |
Instance Method Details
#template_dir ⇒ Object
52 53 54 |
# File 'lib/dingtalk/robot/configurable.rb', line 52 def template_dir @template_dir.presence || (raise ConfigurationError.new(:template_dir, @template_dir, String)) end |
#template_dir=(template_dir) ⇒ Object
48 49 50 |
# File 'lib/dingtalk/robot/configurable.rb', line 48 def template_dir=(template_dir) @template_dir = template_dir.to_s end |
#tokens ⇒ Object
44 45 46 |
# File 'lib/dingtalk/robot/configurable.rb', line 44 def tokens @tokens.presence || (raise ConfigurationError.new(:tokens, @tokens, Hash)) end |
#tokens=(tokens) ⇒ Object
40 41 42 |
# File 'lib/dingtalk/robot/configurable.rb', line 40 def tokens=(tokens) @tokens = tokens.to_h.symbolize_keys! end |