module FlightConfig::Links::ClassMethods
Public Instance Methods
define_link(key, klass, glob: false, &b)
click to toggle source
# File lib/flight_config/links.rb, line 37 def define_link(key, klass, glob: false, &b) links_class.define_method(key) do args = config.instance_exec(&b) method = (glob ? :glob_read : :read) klass.public_send(method, *args, registry: config.__registry__) end end
links_class()
click to toggle source
# File lib/flight_config/links.rb, line 45 def links_class @links_class ||= Struct.new(:config) end