Class: Ravelry::YarnWeight

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

Overview

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

See Pattern for more information about ‘Pattern` objects.

This class will be updated in future to perform GET, POST, PUT, and DESTROY requests.

Instance Attribute Summary

Attributes inherited from Data

#data, #id

Instance Method Summary collapse

Methods inherited from Data

#initialize

Constructor Details

This class inherits a constructor from Ravelry::Data

Instance Method Details

#buildObject



11
# File 'lib/ravelry/yarn_weight.rb', line 11

def build; end

#crochet_gaugeObject

Gets yarn weight’s crochet_gauge from existing ‘data`.



29
30
31
# File 'lib/ravelry/yarn_weight.rb', line 29

def crochet_gauge
  data[:crochet_gauge]
end

#knit_gaugeObject

Gets yarn weight’s knit_gauge from existing ‘data`.



39
40
41
# File 'lib/ravelry/yarn_weight.rb', line 39

def knit_gauge
  data[:knit_gauge]
end

#max_gaugeObject

Gets yarn weight’s max_gauge from existing ‘data`.



44
45
46
# File 'lib/ravelry/yarn_weight.rb', line 44

def max_gauge
  data[:max_gauge]
end

#min_gaugeObject

Gets yarn weight’s min_gauge from existing ‘data`.



19
20
21
# File 'lib/ravelry/yarn_weight.rb', line 19

def min_gauge
  data[:min_gauge]
end

#nameObject

Gets yarn weight’s name from existing ‘data`.



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

def name
  data[:name]
end

#plyObject

Gets yarn weight’s ply from existing ‘data`.



34
35
36
# File 'lib/ravelry/yarn_weight.rb', line 34

def ply
  data[:ply]
end

#wpiObject

Gets yarn weight’s wpi from existing ‘data`.



24
25
26
# File 'lib/ravelry/yarn_weight.rb', line 24

def wpi
  data[:wpi]
end