Sha256: 297c7c8302f00547d43941362569e1195be6de2ac3969d87a77e151e2d807ae5

Contents?: true

Size: 510 Bytes

Versions: 14

Compression:

Stored size: 510 Bytes

Contents

#          Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

require File.expand_path('../../../../lib/ramaze/spec/helper/snippets', __FILE__)

describe Ramaze::Struct do
  should 'provide #values_at' do
    Point = Ramaze::Struct.new(:x, :y)
    point = Point.new(15, 10)

    point.values_at(1, 0).should == [10, 15]
    point.values_at(0..1).should == [15, 10]
    point.values_at(:y, :x).should == [10, 15]
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
Pistos-ramaze-2009.06.12 spec/snippets/ramaze/struct.rb
manveru-ramaze-2009.07 spec/snippets/ramaze/struct.rb
ramaze-2011.12.28 spec/snippets/ramaze/struct.rb
ramaze-2011.10.23 spec/snippets/ramaze/struct.rb
ramaze-2011.07.25 spec/snippets/ramaze/struct.rb
ramaze-2011.01.30 spec/snippets/ramaze/struct.rb
ramaze-2011.01 spec/snippets/ramaze/struct.rb
ramaze-2010.06.18 spec/snippets/ramaze/struct.rb
ramaze-2010.04.04 spec/snippets/ramaze/struct.rb
ramaze-2010.04 spec/snippets/ramaze/struct.rb
ramaze-2010.03 spec/snippets/ramaze/struct.rb
ramaze-2010.01 spec/snippets/ramaze/struct.rb
ramaze-2009.10 spec/snippets/ramaze/struct.rb
ramaze-2009.07 spec/snippets/ramaze/struct.rb