Sha256: b9975674237f91a0b126f7bb9ef7b20bd9eee8fce5922fc52ba281d9ddf06dda

Contents?: true

Size: 250 Bytes

Versions: 1

Compression:

Stored size: 250 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tracksperanto-4.2.0 lib/tracksperanto/block_init.rb