Sha256: e505b29573df8d3777a8afee78f82c760cc47b76e103d6e6d1fb3ce3658c8f16

Contents?: true

Size: 560 Bytes

Versions: 6

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true

module Apkstats::Stub
  class Command
    include Apkstats::Command::Executable

    def initialize(defaults = {})
      @command_path = __FILE__
      @defaults = defaults
    end

    def method_missing(name, *arguments, &block)
      Apkstats::Entity::ApkInfo::KEYS.include?(name.to_sym) && !block && arguments.size == 1 && @defaults[name.to_sym] || super
    end

    def respond_to_missing?(method_name, _include_private = false)
      Apkstats::Entity::ApkInfo::KEYS.include?(method_name.to_sym) || super
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
danger-apkstats-0.3.1 spec/stub/command.rb
danger-apkstats-0.3.0 spec/stub/command.rb
danger-apkstats-0.2.0 spec/stub/command.rb
danger-apkstats-0.1.2 spec/stub/command.rb
danger-apkstats-0.1.1.pre.1 spec/stub/command.rb
danger-apkstats-0.1.0 spec/stub/command.rb