Module: Tracksperanto::BlockInit

Included in:
Export::NukeScript::T, Import::Base, Keyframe, Middleware::Base
Defined in:
lib/tracksperanto/block_init.rb

Overview

Implements the conventional constructor with “hash of attributes” and block support

Instance Method Summary collapse

Instance Method Details

#initialize(object_attribute_hash = {}) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



3
4
5
6
# File 'lib/tracksperanto/block_init.rb', line 3

def initialize(object_attribute_hash = {})
  object_attribute_hash.map { |(k, v)| send("#{k}=", v) }
  yield(self) if block_given?
end