class Awspec::Helper::Finder::SNSTopic::SnsTopic

Attributes

confirmed_subscriptions[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

deleted_subscriptions[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

display_name[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

effective_delivery_policy[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

name[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

owner[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

pending_subscriptions[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

policy[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

topic_arn[R]

to make testing results easier to the eyes instead of using Rspec include matcher for hashes

Public Class Methods

new(attribs) click to toggle source
# File lib/awspec/helper/finder/sns_topic.rb, line 12
def initialize(attribs)
  @policy = attribs['Policy']
  @owner = attribs['Owner']
  @pending_subscriptions = attribs['SubscriptionsPending'].to_i
  @topic_arn = attribs['TopicArn']
  @effective_delivery_policy = attribs['EffectiveDeliveryPolicy']
  @display_name = attribs['DisplayName']
  @confirmed_subscriptions = attribs['SubscriptionsConfirmed'].to_i
  @deleted_subscriptions = attribs['SubscriptionsDeleted'].to_i
  @name = attribs['TopicArn'].split(':')[-1]
end

Public Instance Methods

to_s() click to toggle source
# File lib/awspec/helper/finder/sns_topic.rb, line 24
def to_s
  output = ["SnsTopic: #{name}"]
  instance_variables.each do |attrib|
    tmp = attrib.to_s.sub('@', '')
    output << "  #{tmp} = #{send(tmp)}"
  end
  output.join("\n")
end