Class: Bricolage::SrcFileParam
- Defined in:
- lib/bricolage/parameters.rb
Instance Attribute Summary
Attributes inherited from Param
#arg_spec, #description, #name
Instance Method Summary collapse
- #default_value(ctx, vars) ⇒ Object
-
#initialize(name = 'src-file', arg_spec = 'PATH', description = 'Source file name.', optional: false, publish: false) ⇒ SrcFileParam
constructor
A new instance of SrcFileParam.
- #materialize(path, ctx, vars) ⇒ Object
- #variables(path) ⇒ Object
Methods inherited from Param
#have_arg?, #inspect, #option_name, #optional?, #parse_option_value, #parse_value, #publish?, #required?
Constructor Details
#initialize(name = 'src-file', arg_spec = 'PATH', description = 'Source file name.', optional: false, publish: false) ⇒ SrcFileParam
Returns a new instance of SrcFileParam.
588 589 590 591 |
# File 'lib/bricolage/parameters.rb', line 588 def initialize(name = 'src-file', arg_spec = 'PATH', description = 'Source file name.', optional: false, publish: false) super name, arg_spec, description, optional: optional, publish: publish end |
Instance Method Details
#default_value(ctx, vars) ⇒ Object
593 594 595 |
# File 'lib/bricolage/parameters.rb', line 593 def default_value(ctx, vars) nil end |
#materialize(path, ctx, vars) ⇒ Object
597 598 599 |
# File 'lib/bricolage/parameters.rb', line 597 def materialize(path, ctx, vars) Pathname((path, vars)) end |
#variables(path) ⇒ Object
601 602 603 |
# File 'lib/bricolage/parameters.rb', line 601 def variables(path) wrap_variable_value(path.to_s) end |