Sha256: 56d92701d67e5ec1ac67101c89e802e1fd9954a6ef5aa298e8c5dcc76559eb3d

Contents?: true

Size: 354 Bytes

Versions: 3

Compression:

Stored size: 354 Bytes

Contents

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

# Extensions for OpenStruct

class OpenStruct

  # create a new OpenStruct and fill it with a merge of the old @table and the passed hash

  def temp hash
    self.class.new(@table.merge(hash))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ramaze-0.1.3 lib/ramaze/snippets/openstruct/temp.rb
ramaze-0.1.1 lib/ramaze/snippets/openstruct/temp.rb
ramaze-0.1.2 lib/ramaze/snippets/openstruct/temp.rb