Class: Ravelry::Data

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

Overview

Parent class that controls initialization and fetching for API objects.

Direct Known Subclasses

Pack, Pattern, Photo, User, Yarn, YarnWeight

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = nil) ⇒ Data

Returns a new instance of Data.



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

def initialize(id=nil)
  @id = id
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



7
8
9
# File 'lib/ravelry/data.rb', line 7

def data
  @data
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/ravelry/data.rb', line 6

def id
  @id
end