Class: PostProxy::Media
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#id ⇒ Object
Returns the value of attribute id.
-
#platforms ⇒ Object
Returns the value of attribute platforms.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#status ⇒ Object
Returns the value of attribute status.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ Media
constructor
A new instance of Media.
Methods inherited from Model
Constructor Details
#initialize(**attrs) ⇒ Media
Returns a new instance of Media.
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/postproxy/types.rb', line 115 def initialize(**attrs) @error_message = nil @source_url = nil @url = nil @platforms = nil super if @platforms.is_a?(Array) @platforms = @platforms.map do |p| p.is_a?(MediaPlatformError) ? p : MediaPlatformError.new(**p.transform_keys(&:to_sym)) end end end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def content_type @content_type end |
#error_message ⇒ Object
Returns the value of attribute error_message.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def @error_message end |
#id ⇒ Object
Returns the value of attribute id.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def id @id end |
#platforms ⇒ Object
Returns the value of attribute platforms.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def platforms @platforms end |
#source_url ⇒ Object
Returns the value of attribute source_url.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def source_url @source_url end |
#status ⇒ Object
Returns the value of attribute status.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
113 114 115 |
# File 'lib/postproxy/types.rb', line 113 def url @url end |