class Praxis::Links::DSLCompiler
Attributes
links[R]
Public Class Methods
new(target, dsl_compiler_options:{}, **options)
click to toggle source
Calls superclass method
# File lib/praxis/links.rb, line 8 def initialize(target, dsl_compiler_options:{}, **options) @links = dsl_compiler_options[:links] super end
Public Instance Methods
link(name, type=nil, using: name, **opts, &block)
click to toggle source
# File lib/praxis/links.rb, line 14 def link(name, type=nil, using: name, **opts, &block) links[name] = using if type.nil? && (name != using) type = options[:reference].attributes[using].type end attribute(name, type, **opts, &block) end