Class: PostForMe::Models::TwitterPoll
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- PostForMe::Models::TwitterPoll
- Defined in:
- lib/post_for_me/models/twitter_poll.rb,
sig/post_for_me/models/twitter_poll.rbs
Defined Under Namespace
Modules: ReplySettings
Instance Attribute Summary collapse
-
#duration_minutes ⇒ Float
Duration of the poll in minutes.
-
#options ⇒ Array<String>
The choices of the poll, requiring 2-4 options.
-
#reply_settings ⇒ Symbol, ...
Who can reply to the tweet.
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(duration_minutes:, options:, reply_settings: nil) ⇒ Object
|
|
# File 'lib/post_for_me/models/twitter_poll.rb', line 24
|
Instance Attribute Details
#duration_minutes ⇒ Float
Duration of the poll in minutes
10 |
# File 'lib/post_for_me/models/twitter_poll.rb', line 10 required :duration_minutes, Float |
#options ⇒ Array<String>
The choices of the poll, requiring 2-4 options
16 |
# File 'lib/post_for_me/models/twitter_poll.rb', line 16 required :options, PostForMe::Internal::Type::ArrayOf[String] |
#reply_settings ⇒ Symbol, ...
Who can reply to the tweet
22 |
# File 'lib/post_for_me/models/twitter_poll.rb', line 22 optional :reply_settings, enum: -> { PostForMe::TwitterPoll::ReplySettings } |
Instance Method Details
#to_hash ⇒ {
27 |
# File 'sig/post_for_me/models/twitter_poll.rbs', line 27
def to_hash: -> {
|