Class: NewsmastMastodon::AlttextGetAccount

Inherits:
Object
  • Object
show all
Defined in:
app/models/newsmast_mastodon/alttext_get_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AlttextGetAccount

Returns a new instance of AlttextGetAccount.



8
9
10
11
12
13
14
15
16
17
18
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 8

def initialize(attributes = {})
  @name               = attributes['name']
  @webhook_url        = attributes['webhook_url']
  @notification_email = attributes['notification_email']
  @usage              = attributes['usage']
  @usage_limit        = attributes['usage_limit']
  @whitelabel         = attributes['whitelabel']
  @default_lang       = attributes['default_lang']
  @subscription       = attributes['subscription']
  @errors             = attributes['errors'] || nil
end

Instance Attribute Details

#default_langObject

Returns the value of attribute default_lang.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def default_lang
  @default_lang
end

#errorsObject

Returns the value of attribute errors.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def errors
  @errors
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def name
  @name
end

#notification_emailObject

Returns the value of attribute notification_email.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def notification_email
  @notification_email
end

#subscriptionObject

Returns the value of attribute subscription.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def subscription
  @subscription
end

#usageObject

Returns the value of attribute usage.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def usage
  @usage
end

#usage_limitObject

Returns the value of attribute usage_limit.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def usage_limit
  @usage_limit
end

#webhook_urlObject

Returns the value of attribute webhook_url.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def webhook_url
  @webhook_url
end

#whitelabelObject

Returns the value of attribute whitelabel.



5
6
7
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 5

def whitelabel
  @whitelabel
end

Instance Method Details

#has_errors?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/models/newsmast_mastodon/alttext_get_account.rb', line 20

def has_errors?
  @errors.present?
end