Sha256: 58dcf3ff5eafe0d94774b5af1e56839face9c9ea675efe8ee85e3ba2271b09a0
Contents?: true
Size: 737 Bytes
Versions: 2
Compression:
Stored size: 737 Bytes
Contents
# typed: strict # frozen_string_literal: true require "sorbet-runtime" require "nexus/invision/value_object" module Nexus module Invision module Resources # Member is a User with additional information about their membership. class Question < T::Struct include ValueObject const :question, String const :options, T::Hash[String, T.untyped] class << self extend T::Sig sig { params(response: T::Hash[String, T.untyped]).returns(Question) } def from_response(response) Question.new( question: response["question"], options: response["options"], ) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nexus-invision-1.11.0 | lib/nexus/invision/resources/question.rb |
nexus-invision-1.10.2 | lib/nexus/invision/resources/question.rb |