Class: Bricolage::StringParam

Inherits:
Param
  • Object
show all
Defined in:
lib/bricolage/parameters.rb

Instance Attribute Summary

Attributes inherited from Param

#arg_spec, #description, #name

Instance Method Summary collapse

Methods inherited from Param

#have_arg?, #inspect, #option_name, #optional?, #parse_option_value, #parse_value, #publish?, #required?

Constructor Details

#initialize(name, arg_spec, description, optional: false, publish: false) ⇒ StringParam

Returns a new instance of StringParam.



334
335
336
# File 'lib/bricolage/parameters.rb', line 334

def initialize(name, arg_spec, description, optional: false, publish: false)
  super name, arg_spec, description, optional: optional, publish: publish
end

Instance Method Details

#default_value(ctx, vars) ⇒ Object



338
339
340
# File 'lib/bricolage/parameters.rb', line 338

def default_value(ctx, vars)
  nil
end

#materialize(value, ctx, vars) ⇒ Object



342
343
344
# File 'lib/bricolage/parameters.rb', line 342

def materialize(value, ctx, vars)
  expand(value, vars)
end

#variables(value) ⇒ Object



346
347
348
# File 'lib/bricolage/parameters.rb', line 346

def variables(value)
  wrap_variable_value(value)
end