Exception: Twterm::Tweetbox::TextTooLongError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/twterm/tweetbox.rb

Instance Method Summary collapse

Constructor Details

#initialize(parse_result) ⇒ TextTooLongError

Returns a new instance of TextTooLongError.



9
10
11
# File 'lib/twterm/tweetbox.rb', line 9

def initialize(parse_result)
  @parse_result = parse_result
end

Instance Method Details

#messageObject



13
14
15
# File 'lib/twterm/tweetbox.rb', line 13

def message
  "Text is too long (weighted length: #{@parse_result[:weighted_length]} / 280)"
end