Sha256: 3c051f1d5562ea3df958ceb8d2b47d4647b8307597db79f11aa77ee774b04a22

Contents?: true

Size: 476 Bytes

Versions: 10

Compression:

Stored size: 476 Bytes

Contents

module YarnWeightHelpers

  # Helpers for Ravelry::YarnWeight

  def yw_initialize_empty_yarn
    Ravelry::YarnWeight.new
  end

  def yw_initialize_with_id
    Ravelry::YarnWeight.new(yarn_weight_hash[:id])
  end

  def yw_initialize_with_data_and_id
    yarn = Ravelry::YarnWeight.new(yarn_weight_hash[:id])
    yarn.data = yarn_weight_hash
    yarn
  end

  def yw_initialize_with_data
    yarn = Ravelry::YarnWeight.new
    yarn.data = yarn_weight_hash
    yarn
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ravelry-0.2.0 spec/helpers/yarn_weight_helpers.rb
ravelry-0.1.0 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.9 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.8 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.7 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.6 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.5 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.4 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.2 spec/helpers/yarn_weight_helpers.rb
ravelry-0.0.1 spec/helpers/yarn_weight_helpers.rb