Class: ParamsReady::Parameter::TupleParameterBuilder

Inherits:
Builder show all
Includes:
Marshaller::BuilderModule
Defined in:
lib/params_ready/parameter/tuple_parameter.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Marshaller::BuilderModule

#marshal

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



77
78
79
# File 'lib/params_ready/parameter/tuple_parameter.rb', line 77

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

Instance Method Details

#field(input, *args, **opts, &block) ⇒ Object



81
82
83
84
# File 'lib/params_ready/parameter/tuple_parameter.rb', line 81

def field(input, *args, **opts, &block)
  definition = self.class.resolve(input, *args, **opts, &block)
  @definition.add_field definition
end