Class: Meta::RouteDSL::ApplicationBuilder::BindingMeta

Inherits:
Object
  • Object
show all
Defined in:
lib/meta/route_dsl/application_builder.rb

Overview

绑定 Meta,绑定的 Meta 会覆盖父级的 Meta,用于 Application.apply 方法

Instance Method Summary collapse

Constructor Details

#initialize(builder, meta) ⇒ BindingMeta

Returns a new instance of BindingMeta.



103
104
105
106
# File 'lib/meta/route_dsl/application_builder.rb', line 103

def initialize(builder, meta)
  @builder = builder
  @meta = meta
end

Instance Method Details

#build(meta_options: {}, **kwargs) ⇒ Object



108
109
110
111
# File 'lib/meta/route_dsl/application_builder.rb', line 108

def build(meta_options: {}, **kwargs)
  meta_options = Utils::RouteDSLBuilders.merge_meta_options(meta_options, @meta)
  @builder.build(meta_options: meta_options, **kwargs)
end