Class: AWSSNSSubscription::SNS
- Inherits:
-
Object
- Object
- AWSSNSSubscription::SNS
- Defined in:
- lib/aws_sns_subscription/sns.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #authentic? ⇒ Boolean
-
#initialize(json) ⇒ SNS
constructor
A new instance of SNS.
- #subscribe_url ⇒ Object
Constructor Details
#initialize(json) ⇒ SNS
Returns a new instance of SNS.
6 7 8 |
# File 'lib/aws_sns_subscription/sns.rb', line 6 def initialize(json) @raw = json end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
4 5 6 |
# File 'lib/aws_sns_subscription/sns.rb', line 4 def raw @raw end |
Instance Method Details
#authentic? ⇒ Boolean
14 15 16 |
# File 'lib/aws_sns_subscription/sns.rb', line 14 def authentic? subscribe_url =~ /^https.*amazonaws\.com\// end |
#subscribe_url ⇒ Object
10 11 12 |
# File 'lib/aws_sns_subscription/sns.rb', line 10 def subscribe_url JSON.parse(raw)["SubscribeURL"] end |