# File lib/aws/policy.rb, line 859 def translate_action(action) case action when String then action when :any then '*' when Symbol if self.class == AWS::Policy::Statement msg = 'symbolized action names are only accepted by service ' + 'specific policies (e.g. AWS::S3::Policy)' raise ArgumentError, msg end unless self.class::ACTION_MAPPING.has_key?(action) raise ArgumentError, "unrecognized action: #{action}" end self.class::ACTION_MAPPING[action] end end