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-2.9.3 lib/tracksperanto/block_init.rb
tracksperanto-2.9.2 lib/tracksperanto/block_init.rb
tracksperanto-2.9.1 lib/tracksperanto/block_init.rb
tracksperanto-2.9.0 lib/tracksperanto/block_init.rb