class Multisync::Definition::Template

Attributes

block[R]

The block the template holds

name[R]

The name of the template

Public Class Methods

lookup(name) click to toggle source
# File lib/multisync/definition/template.rb, line 11
def self.lookup name
  @registered.find {|instance| instance.name == name }
end
new(name, &block) click to toggle source
# File lib/multisync/definition/template.rb, line 21
def initialize name, &block
  @name = name
  self.class.register self
  @block = block
end
register(instance) click to toggle source
# File lib/multisync/definition/template.rb, line 7
def self.register instance
  @registered << instance
end