Class: Commander::HelpFormatter::Context
- Inherits:
-
Object
- Object
- Commander::HelpFormatter::Context
- Defined in:
- lib/commander/help_formatters.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#decorate_binding(_bind) ⇒ Object
No-op, override in subclasses.
- #get_binding ⇒ Object
-
#initialize(target) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(target) ⇒ Context
Returns a new instance of Context.
7 8 9 |
# File 'lib/commander/help_formatters.rb', line 7 def initialize(target) @target = target end |
Instance Method Details
#decorate_binding(_bind) ⇒ Object
No-op, override in subclasses.
18 19 |
# File 'lib/commander/help_formatters.rb', line 18 def decorate_binding(_bind) end |
#get_binding ⇒ Object
11 12 13 14 15 |
# File 'lib/commander/help_formatters.rb', line 11 def get_binding @target.instance_eval { binding }.tap do |bind| decorate_binding(bind) end end |