Sha256: 28829d27c445ec396c1152a1a8735075add083c2e3af572e92fd140b414107be

Contents?: true

Size: 578 Bytes

Versions: 2

Compression:

Stored size: 578 Bytes

Contents

# -*- coding: utf-8 -*-

module RubyAnything
  require "curses"
  require "ruby-anything/version"
  require "ruby-anything/windows"
  require "ruby-anything/kernel_ext"

  def self.execute(ary)
    unless ary.respond_to? :to_a
      raise ArgumentError, "Invalid argument `#{ary}` for RubyAnything.execute. This argument must be Array"
    end
    unless ary.all? { |e| e.respond_to?(:to_s) }
      raise ArgumentError, "Invalid argument `#{ary}` for RubyAnything.execute. This argument's element must have `to_s` method"
    end

    Windows.anything ary.map(&:to_s)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-anything-0.0.2 lib/ruby-anything.rb
ruby-anything-0.0.1 lib/ruby-anything.rb