Exception: Tweetwine::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/tweetwine/exceptions.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.status_code(code = nil) ⇒ Object

Idea got from Bundler.



8
9
10
11
# File 'lib/tweetwine/exceptions.rb', line 8

def self.status_code(code = nil)
  return @status_code unless code
  @status_code = code
end

Instance Method Details

#status_codeObject



13
14
15
# File 'lib/tweetwine/exceptions.rb', line 13

def status_code
  self.class.status_code
end