Class: Ravelry::Author
- Inherits:
-
Object
- Object
- Ravelry::Author
- Defined in:
- lib/ravelry/author.rb
Overview
There is no API access point for PatternAuthors. The information used to create ‘Ravelry::Author` comes from Pattern objects.
You should not create ‘Author` objects manually; they are all created–and owned by–by a Pattern.
See Pattern for more information about ‘Pattern` objects.
This does not inherit from Data because it doesn’t have a corresponding API endpoint.
Instance Attribute Summary collapse
-
#favorites_count ⇒ Object
readonly
Returns the value of attribute favorites_count.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#patterns_count ⇒ Object
readonly
Returns the value of attribute patterns_count.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
Instance Method Summary collapse
-
#initialize(pattern_author) ⇒ Author
constructor
Creates new ‘Author` from Ravelry API PatternAuthor attributes.
Constructor Details
#initialize(pattern_author) ⇒ Author
Creates new ‘Author` from Ravelry API PatternAuthor attributes.
All class variables are readonly.
18 19 20 21 22 23 24 |
# File 'lib/ravelry/author.rb', line 18 def initialize() @id = [:id] @name = [:name] @permalink = [:permalink] @patterns_count = [:patterns_count] @favorites_count = [:favorites_count] end |
Instance Attribute Details
#favorites_count ⇒ Object (readonly)
Returns the value of attribute favorites_count.
12 13 14 |
# File 'lib/ravelry/author.rb', line 12 def favorites_count @favorites_count end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
12 13 14 |
# File 'lib/ravelry/author.rb', line 12 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/ravelry/author.rb', line 12 def name @name end |
#patterns_count ⇒ Object (readonly)
Returns the value of attribute patterns_count.
12 13 14 |
# File 'lib/ravelry/author.rb', line 12 def patterns_count @patterns_count end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
12 13 14 |
# File 'lib/ravelry/author.rb', line 12 def permalink @permalink end |