Class: Rodish::Plugins::HelpOptionValues::ContextWrappedOptionValues
- Inherits:
-
ContextSensitiveHelp_::ContextHelp
- Object
- ContextSensitiveHelp_::ContextHelp
- Rodish::Plugins::HelpOptionValues::ContextWrappedOptionValues
- Defined in:
- lib/rodish/plugins/help_option_values.rb
Overview
Used to wrap context sensitive option values, when the allowed options differ depending on the context.
Instance Method Summary collapse
-
#call(context) ⇒ Object
Get the allowed values using the provided context, then wrap the values.
-
#initialize(name, block) ⇒ ContextWrappedOptionValues
constructor
A new instance of ContextWrappedOptionValues.
Constructor Details
#initialize(name, block) ⇒ ContextWrappedOptionValues
Returns a new instance of ContextWrappedOptionValues.
21 22 23 24 |
# File 'lib/rodish/plugins/help_option_values.rb', line 21 def initialize(name, block) @name = name super(block) end |
Instance Method Details
#call(context) ⇒ Object
Get the allowed values using the provided context, then wrap the values.
27 28 29 |
# File 'lib/rodish/plugins/help_option_values.rb', line 27 def call(context) Wrap_.wrap(" #{@name}", super) end |