Exception: SocialCount::TwitterApiError
- Defined in:
- lib/social_count/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(msg, code) ⇒ TwitterApiError
constructor
A new instance of TwitterApiError.
- #to_s ⇒ Object
Constructor Details
#initialize(msg, code) ⇒ TwitterApiError
Returns a new instance of TwitterApiError.
6 7 8 9 |
# File 'lib/social_count/error.rb', line 6 def initialize(msg, code) @code = code.is_a?(Array) ? code.join(", ") : code super(msg) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/social_count/error.rb', line 5 def code @code end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/social_count/error.rb', line 10 def to_s "Code(s): #{code}\nSee code explanations at https://dev.twitter.com/docs/error-codes-responses" end |