Class: FakeSNS::Actions::GetTopicAttributes
- Inherits:
-
FakeSNS::Action
- Object
- FakeSNS::Action
- FakeSNS::Actions::GetTopicAttributes
- Defined in:
- lib/fake_sns/actions/get_topic_attributes.rb
Instance Attribute Summary collapse
-
#topic ⇒ Object
readonly
TopicArn Owner Policy DisplayName SubscriptionsPending SubscriptionsConfirmed SubscriptionsDeleted DeliveryPolicy EffectiveDeliveryPolicy.
Attributes inherited from FakeSNS::Action
Instance Method Summary collapse
Methods inherited from FakeSNS::Action
Constructor Details
This class inherits a constructor from FakeSNS::Action
Instance Attribute Details
#topic ⇒ Object (readonly)
TopicArn Owner Policy DisplayName SubscriptionsPending SubscriptionsConfirmed SubscriptionsDeleted DeliveryPolicy EffectiveDeliveryPolicy
17 18 19 |
# File 'lib/fake_sns/actions/get_topic_attributes.rb', line 17 def topic @topic end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'lib/fake_sns/actions/get_topic_attributes.rb', line 19 def call @topic = db.topics.fetch(arn) { raise NotFound, arn } end |
#each_attribute {|"TopicArn", arn| ... } ⇒ Object
23 24 25 26 27 28 |
# File 'lib/fake_sns/actions/get_topic_attributes.rb', line 23 def each_attribute yield "TopicArn", arn %w(DisplayName Policy DeliveryPolicy).each do |key| yield key, topic[key] if topic.has_key?(key) end end |