Class: Stealth::ServiceReply
- Inherits:
-
Object
- Object
- Stealth::ServiceReply
- Defined in:
- lib/stealth/service_reply.rb
Instance Attribute Summary collapse
-
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
-
#replies ⇒ Object
Returns the value of attribute replies.
Instance Method Summary collapse
-
#initialize(recipient_id:, yaml_reply:, context:) ⇒ ServiceReply
constructor
A new instance of ServiceReply.
Constructor Details
#initialize(recipient_id:, yaml_reply:, context:) ⇒ ServiceReply
Returns a new instance of ServiceReply.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/stealth/service_reply.rb', line 9 def initialize(recipient_id:, yaml_reply:, context:) @recipient_id = recipient_id begin erb_reply = ERB.new(yaml_reply).result(context) rescue NameError => e raise(Stealth::Errors::UndefinedVariable, e.) end @replies = load_replies(YAML.load(erb_reply)) end |
Instance Attribute Details
#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 |