Class: TRMNL::API::Models::Recipes::Author

Inherits:
Struct
  • Object
show all
Defined in:
lib/trmnl/api/models/recipes/author.rb

Overview

Models the author of the API response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#categoryObject

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def category
  @category
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def description
  @description
end

#description_localesObject

Returns the value of attribute description_locales

Returns:

  • (Object)

    the current value of description_locales



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def description_locales
  @description_locales
end

#email_addressObject

Returns the value of attribute email_address

Returns:

  • (Object)

    the current value of email_address



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def email_address
  @email_address
end

#field_typeObject

Returns the value of attribute field_type

Returns:

  • (Object)

    the current value of field_type



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def field_type
  @field_type
end

#github_urlObject

Returns the value of attribute github_url

Returns:

  • (Object)

    the current value of github_url



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def github_url
  @github_url
end

#keynameObject

Returns the value of attribute keyname

Returns:

  • (Object)

    the current value of keyname



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def keyname
  @keyname
end

#learn_more_urlObject

Returns the value of attribute learn_more_url

Returns:

  • (Object)

    the current value of learn_more_url



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def learn_more_url
  @learn_more_url
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def name
  @name
end

#youtube_urlObject

Returns the value of attribute youtube_url

Returns:

  • (Object)

    the current value of youtube_url



8
9
10
# File 'lib/trmnl/api/models/recipes/author.rb', line 8

def youtube_url
  @youtube_url
end

Class Method Details

.for(locale_reducer: LocaleReducer, **attributes) ⇒ Object



20
21
22
23
# File 'lib/trmnl/api/models/recipes/author.rb', line 20

def self.for(locale_reducer: LocaleReducer, **attributes)
  description_locales = locale_reducer.call attributes
  new(description_locales:, **attributes)
end