Class: Ravelry::Craft

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

Overview

The information used to create ‘Ravelry::Craft` currently comes from Pattern objects.

You should not create ‘Craft` objects manually; they are all created–and owned–by a Pattern.

See Pattern for more information about ‘Pattern` objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Craft

Returns a new instance of Craft.



13
14
15
16
# File 'lib/ravelry/craft.rb', line 13

def initialize(data)
  @permalink = data[:permalink]
  @name = data[:name]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/ravelry/craft.rb', line 11

def name
  @name
end

Returns the value of attribute permalink.



11
12
13
# File 'lib/ravelry/craft.rb', line 11

def permalink
  @permalink
end