Sha256: 80de483dbb54330407b3c68e5175a9ac3dc634482ff3771c02f7fd14104bf8e1

Contents?: true

Size: 292 Bytes

Versions: 24

Compression:

Stored size: 292 Bytes

Contents

# -*- encoding : utf-8 -*-
# Implements the conventional constructor with "hash of attributes" and block support
module Tracksperanto::BlockInit
  def initialize(object_attribute_hash = {})
    object_attribute_hash.map { |(k, v)| send("#{k}=", v) }
    yield(self) if block_given?
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
tracksperanto-3.3.6 lib/tracksperanto/block_init.rb
tracksperanto-3.3.0.pre lib/tracksperanto/block_init.rb
tracksperanto-3.2.2 lib/tracksperanto/block_init.rb
tracksperanto-3.2.1 lib/tracksperanto/block_init.rb
tracksperanto-3.2.0 lib/tracksperanto/block_init.rb
tracksperanto-3.1.0 lib/tracksperanto/block_init.rb
tracksperanto-3.0.1 lib/tracksperanto/block_init.rb
tracksperanto-3.0.0 lib/tracksperanto/block_init.rb
tracksperanto-2.12.0 lib/tracksperanto/block_init.rb
tracksperanto-2.11.3 lib/tracksperanto/block_init.rb
tracksperanto-2.11.2 lib/tracksperanto/block_init.rb
tracksperanto-2.11.1 lib/tracksperanto/block_init.rb
tracksperanto-2.11.0 lib/tracksperanto/block_init.rb
tracksperanto-2.10.0 lib/tracksperanto/block_init.rb
tracksperanto-2.9.9 lib/tracksperanto/block_init.rb
tracksperanto-2.9.8 lib/tracksperanto/block_init.rb
tracksperanto-2.9.7 lib/tracksperanto/block_init.rb
tracksperanto-2.9.6 lib/tracksperanto/block_init.rb
tracksperanto-2.9.5 lib/tracksperanto/block_init.rb
tracksperanto-2.9.4 lib/tracksperanto/block_init.rb