Module: Toy::References::ClassMethods

Defined in:
lib/toy/references.rb

Instance Method Summary collapse

Instance Method Details

#reference(name, *args) ⇒ Object



14
15
16
# File 'lib/toy/references.rb', line 14

def reference(name, *args)
  Reference.new(self, name, *args)
end

#reference?(key) ⇒ Boolean

Returns:



10
11
12
# File 'lib/toy/references.rb', line 10

def reference?(key)
  references.keys.include?(key.to_sym)
end

#referencesObject



6
7
8
# File 'lib/toy/references.rb', line 6

def references
  @references ||= {}
end