Class: NewsmastMastodon::AlttextCreateImage
- Inherits:
-
Object
- Object
- NewsmastMastodon::AlttextCreateImage
- Defined in:
- app/models/newsmast_mastodon/alttext_create_image.rb
Instance Attribute Summary collapse
-
#alt_text ⇒ Object
Returns the value of attribute alt_text.
-
#alt_texts ⇒ Object
Returns the value of attribute alt_texts.
-
#asset_id ⇒ Object
Returns the value of attribute asset_id.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #has_errors? ⇒ Boolean
-
#initialize(response_hash = {}) ⇒ AlttextCreateImage
constructor
A new instance of AlttextCreateImage.
Constructor Details
#initialize(response_hash = {}) ⇒ AlttextCreateImage
Returns a new instance of AlttextCreateImage.
7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 7 def initialize(response_hash = {}) @asset_id = response_hash['asset_id'] @url = response_hash['url'] @alt_text = response_hash['alt_text'] @alt_texts = response_hash['alt_texts'] @metadata = response_hash['metadata'] @created_at = response_hash['created_at'] @errors = response_hash['errors'] @error_code = response_hash['error_code'] end |
Instance Attribute Details
#alt_text ⇒ Object
Returns the value of attribute alt_text.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def alt_text @alt_text end |
#alt_texts ⇒ Object
Returns the value of attribute alt_texts.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def alt_texts @alt_texts end |
#asset_id ⇒ Object
Returns the value of attribute asset_id.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def asset_id @asset_id end |
#created_at ⇒ Object
Returns the value of attribute created_at.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def created_at @created_at end |
#error_code ⇒ Object
Returns the value of attribute error_code.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def error_code @error_code end |
#errors ⇒ Object
Returns the value of attribute errors.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def errors @errors end |
#metadata ⇒ Object
Returns the value of attribute metadata.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def @metadata end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 5 def url @url end |
Instance Method Details
#has_errors? ⇒ Boolean
18 19 20 |
# File 'app/models/newsmast_mastodon/alttext_create_image.rb', line 18 def has_errors? @error_code.present? || @errors.present? end |