Class: ParamsReady::Parameter::StructParameterBuilder

Inherits:
Builder show all
Includes:
Marshaller::BuilderModule, AbstractStructParameterBuilder::StructLike
Defined in:
lib/params_ready/parameter/struct_parameter.rb

Direct Known Subclasses

StateBuilder

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Marshaller::BuilderModule

#marshal

Methods included from AbstractStructParameterBuilder::StructLike

#add

Methods inherited from Builder

#helper

Methods inherited from AbstractBuilder

#build, builder, define_parameter, define_registered_parameter, #fetch, fetch_builder, #include, #initialize, #open?, register, register_deprecated, resolve

Methods included from Extensions::Registry

#human_string, #registry

Constructor Details

This class inherits a constructor from ParamsReady::AbstractBuilder

Class Method Details

.instance(name, altn: nil) ⇒ Object



19
20
21
# File 'lib/params_ready/parameter/struct_parameter.rb', line 19

def self.instance(name, altn: nil)
  new StructParameterDefinition.new(name, altn: altn)
end

Instance Method Details

#map(hash) ⇒ Object



23
24
25
# File 'lib/params_ready/parameter/struct_parameter.rb', line 23

def map(hash)
  @definition.add_map(hash, **{})
end