Class: BundlerSkills::Command::OverrideDryRun

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler_skills/command.rb

Overview

Wraps a Config to force dry_run? true without mutating the original.

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ OverrideDryRun

Returns a new instance of OverrideDryRun.



109
110
111
# File 'lib/bundler_skills/command.rb', line 109

def initialize(config)
  @config = config
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



121
122
123
# File 'lib/bundler_skills/command.rb', line 121

def method_missing(name, *args, &block)
  @config.send(name, *args, &block)
end

Instance Method Details

#dry_run?Boolean

Returns:

  • (Boolean)


113
114
115
# File 'lib/bundler_skills/command.rb', line 113

def dry_run?
  true
end

#respond_to_missing?(name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/bundler_skills/command.rb', line 117

def respond_to_missing?(name, include_private = false)
  @config.respond_to?(name, include_private) || super
end