Class: Avm::Registry::ApplicationStereotypes::StereotypeBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/registry/application_stereotypes/stereotype_builder.rb

Instance Method Summary collapse

Instance Method Details

#add_object(type, object) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/avm/registry/application_stereotypes/stereotype_builder.rb', line 12

def add_object(type, object)
  type = type.to_sym
  raise "#{attr_method} is already present" if resources.key?(type)

  resources[::Avm::ApplicationStereotypes::Base.lists.resource.value_validate!(type)] =
    object
end

#buildAvm::ApplicationStereotypes::Base



21
22
23
# File 'lib/avm/registry/application_stereotypes/stereotype_builder.rb', line 21

def build
  ::Avm::ApplicationStereotypes::Base.new(namespace_module, resources)
end