class Twitter::TwitterText::Validation::ParseResults
:weighted_length the weighted length of tweet based on weights specified in the config :valid If tweet is valid :permillage permillage of the tweet over the max length specified in config :valid_range_start beginning of valid text :valid_range_end End index of valid part of the tweet text (inclusive) :display_range_start beginning index of display text :display_range_end end index of display text (inclusive)
Constants
- RESULT_PARAMS
Public Class Methods
empty()
click to toggle source
# File lib/twitter-text/validation.rb, line 25 def self.empty return ParseResults.new(weighted_length: 0, permillage: 0, valid: true, display_range_start: 0, display_range_end: 0, valid_range_start: 0, valid_range_end: 0) end
new(params = {})
click to toggle source
Calls superclass method
# File lib/twitter-text/validation.rb, line 29 def initialize(params = {}) RESULT_PARAMS.each do |key| super[key] = params[key] if params.key?(key) end end