Class: Ravelry::SocialSite

Inherits:
Object
  • Object
show all
Defined in:
lib/ravelry/social_site.rb

Overview

There is no API access point for PatternAuthors. The information used to create ‘Ravelry::SocialSite` comes from other objects.

You should not create ‘Author` objects manually; they are all created–and owned by–other objects.

This does not inherit from Data because it doesn’t have a corresponding API endpoint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(social_site) ⇒ SocialSite

Creates new ‘SocialSite` from Ravelry API attributes.

All class variables are readonly.



15
16
17
18
19
20
# File 'lib/ravelry/social_site.rb', line 15

def initialize(social_site)
  @id = social_site[:id]
  @active = social_site[:active]
  @favicon_url = social_site[:favicon_url]
  @name = social_site[:name]
end

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active.



9
10
11
# File 'lib/ravelry/social_site.rb', line 9

def active
  @active
end

#favicon_urlObject (readonly)

Returns the value of attribute favicon_url.



9
10
11
# File 'lib/ravelry/social_site.rb', line 9

def favicon_url
  @favicon_url
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/ravelry/social_site.rb', line 9

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/ravelry/social_site.rb', line 9

def name
  @name
end