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.1.1 lib/tracksperanto/block_init.rb
tracksperanto-2.1.0 lib/tracksperanto/block_init.rb
tracksperanto-2.0.2 lib/tracksperanto/block_init.rb
tracksperanto-2.0.1 lib/tracksperanto/block_init.rb
tracksperanto-2.0.0 lib/tracksperanto/block_init.rb
tracksperanto-1.9.9 lib/tracksperanto/block_init.rb
tracksperanto-1.9.8 lib/tracksperanto/block_init.rb
tracksperanto-1.9.6 lib/tracksperanto/block_init.rb
tracksperanto-1.9.5 lib/tracksperanto/block_init.rb
tracksperanto-1.9.4 lib/tracksperanto/block_init.rb
tracksperanto-1.9.3 lib/tracksperanto/block_init.rb
tracksperanto-1.9.2 lib/tracksperanto/block_init.rb
tracksperanto-1.9.1 lib/tracksperanto/block_init.rb
tracksperanto-1.9.0 lib/tracksperanto/block_init.rb
tracksperanto-1.8.4 lib/tracksperanto/block_init.rb
tracksperanto-1.8.2 lib/tracksperanto/block_init.rb
tracksperanto-1.8.1 lib/tracksperanto/block_init.rb
tracksperanto-1.8.0 lib/tracksperanto/block_init.rb
tracksperanto-1.7.5 lib/tracksperanto/block_init.rb
tracksperanto-1.7.4 lib/tracksperanto/block_init.rb