Module: Tracksperanto::BlockInit

Included in:
Import::Base, Keyframe, Parameters::Parameter, Pipeline::Base, Tool::Base, Tracker
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(attributes = {}) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



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

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