Class: XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult::Checklist

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/compose_create_response.rb,
sig/x_twitter_scraper/models/compose_create_response.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(factor:, passed:, suggestion: nil) ⇒ Object

Parameters:

  • factor (String)
  • passed (Boolean)
  • suggestion (String) (defaults to: nil)

    Present only when the check fails.



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/x_twitter_scraper/models/compose_create_response.rb', line 369

class Checklist < XTwitterScraper::Internal::Type::BaseModel
  # @!attribute factor
  #
  #   @return [String]
  required :factor, String

  # @!attribute passed
  #
  #   @return [Boolean]
  required :passed, XTwitterScraper::Internal::Type::Boolean

  # @!attribute suggestion
  #   Present only when the check fails.
  #
  #   @return [String, nil]
  optional :suggestion, String

  # @!method initialize(factor:, passed:, suggestion: nil)
  #   @param factor [String]
  #
  #   @param passed [Boolean]
  #
  #   @param suggestion [String] Present only when the check fails.
end

Instance Attribute Details

#factorString

Parameters:

  • value (String)

Returns:

  • (String)


373
# File 'lib/x_twitter_scraper/models/compose_create_response.rb', line 373

required :factor, String

#passedBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


378
# File 'lib/x_twitter_scraper/models/compose_create_response.rb', line 378

required :passed, XTwitterScraper::Internal::Type::Boolean

#suggestionString?

Present only when the check fails.

Parameters:

  • (String)

Returns:

  • (String, nil)


384
# File 'lib/x_twitter_scraper/models/compose_create_response.rb', line 384

optional :suggestion, String

Instance Method Details

#to_hash{ factor: String, passed: bool, suggestion: String }

Returns:

  • ({ factor: String, passed: bool, suggestion: String })


322
# File 'sig/x_twitter_scraper/models/compose_create_response.rbs', line 322

def to_hash: -> { factor: String, passed: bool, suggestion: String }