Module: PoiseLanguages::Command::Mixin::Provider::ClassMethods
- Included in:
- PoiseLanguages::Command::Mixin::Provider
- Defined in:
- lib/poise_languages/command/mixin.rb
Overview
Instance Method Summary collapse
- #included(klass) ⇒ Object private
-
#language_command_mixin(name) ⇒ void
Configure this module or class for a specific language.
Instance Method Details
#included(klass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
228 229 230 231 |
# File 'lib/poise_languages/command/mixin.rb', line 228 def included(klass) super klass.extend(ClassMethods) end |
#language_command_mixin(name) ⇒ void
This method returns an undefined value.
Configure this module or class for a specific language.
215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/poise_languages/command/mixin.rb', line 215 def language_command_mixin(name) define_method(:"#{name}_shell_out") do |*command_args| language_command_shell_out(name, *command_args) end private :"#{name}_shell_out" define_method(:"#{name}_shell_out!") do |*command_args| language_command_shell_out!(name, *command_args) end private :"#{name}_shell_out!" end |