Class: Stealth::ServiceReply
- Inherits:
-
Object
- Object
- Stealth::ServiceReply
- Defined in:
- lib/stealth/service_reply.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
-
#replies ⇒ Object
Returns the value of attribute replies.
-
#yaml_reply ⇒ Object
Returns the value of attribute yaml_reply.
Instance Method Summary collapse
-
#initialize(recipient_id:, yaml_reply:, context:, preprocessor: :none) ⇒ ServiceReply
constructor
A new instance of ServiceReply.
Constructor Details
#initialize(recipient_id:, yaml_reply:, context:, preprocessor: :none) ⇒ ServiceReply
Returns a new instance of ServiceReply.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/stealth/service_reply.rb', line 9 def initialize(recipient_id:, yaml_reply:, context:, preprocessor: :none) @recipient_id = recipient_id @yaml_reply = yaml_reply @context = context processed_reply = case preprocessor when :erb preprocess_erb when :none @yaml_reply end @replies = load_replies(YAML.load(processed_reply)) end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
7 8 9 |
# File 'lib/stealth/service_reply.rb', line 7 def context @context end |
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
7 8 9 |
# File 'lib/stealth/service_reply.rb', line 7 def recipient_id @recipient_id end |
#replies ⇒ Object
Returns the value of attribute replies.
7 8 9 |
# File 'lib/stealth/service_reply.rb', line 7 def replies @replies end |
#yaml_reply ⇒ Object
Returns the value of attribute yaml_reply.
7 8 9 |
# File 'lib/stealth/service_reply.rb', line 7 def yaml_reply @yaml_reply end |