Sha256: 1ef8ca0b73a749290c1e2c53052b467c5ad2280a747127dab5486d910a6398ea

Contents?: true

Size: 265 Bytes

Versions: 71

Compression:

Stored size: 265 Bytes

Contents

# 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

71 entries across 71 versions & 1 rubygems

Version Path
tracksperanto-2.8.6 lib/tracksperanto/block_init.rb
tracksperanto-2.8.5 lib/tracksperanto/block_init.rb
tracksperanto-2.8.4 lib/tracksperanto/block_init.rb
tracksperanto-2.8.2 lib/tracksperanto/block_init.rb
tracksperanto-2.8.1 lib/tracksperanto/block_init.rb
tracksperanto-2.8.0 lib/tracksperanto/block_init.rb
tracksperanto-2.7.0 lib/tracksperanto/block_init.rb
tracksperanto-2.6.3 lib/tracksperanto/block_init.rb
tracksperanto-2.6.2 lib/tracksperanto/block_init.rb
tracksperanto-2.6.1 lib/tracksperanto/block_init.rb
tracksperanto-2.6.0 lib/tracksperanto/block_init.rb
tracksperanto-2.5.0 lib/tracksperanto/block_init.rb
tracksperanto-2.4.1 lib/tracksperanto/block_init.rb
tracksperanto-2.3.3 lib/tracksperanto/block_init.rb
tracksperanto-2.3.2 lib/tracksperanto/block_init.rb
tracksperanto-2.3.1 lib/tracksperanto/block_init.rb
tracksperanto-2.3.0 lib/tracksperanto/block_init.rb
tracksperanto-2.2.4 lib/tracksperanto/block_init.rb
tracksperanto-2.2.2 lib/tracksperanto/block_init.rb
tracksperanto-2.2.0 lib/tracksperanto/block_init.rb