Sha256: 7226ae7d92ccaedabcfb078026a4ea6841eb5621f7e57e5b23e92d155fa8a9ae

Contents?: true

Size: 334 Bytes

Versions: 9

Compression:

Stored size: 334 Bytes

Contents

# frozen_string_literal: true

require "date"

module Matheus
  # Usage:
  #    $ puts "Date.today"
  #    2024-08-26
  class Puts < Command
    def call(argv)
      puts eval(argv.join(" ")) # standard:disable Security/Eval
    rescue Exception => e # standard:disable Lint/RescueException
      Failure(e.message)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
matheus-0.6.3 lib/matheus/puts.rb
matheus-0.6.2 lib/matheus/puts.rb
matheus-0.6.1 lib/matheus/puts.rb
matheus-0.6.0 lib/matheus/puts.rb
matheus-0.5.0 lib/matheus/puts.rb
matheus-0.4.0 lib/matheus/puts.rb
matheus-0.3.0 lib/matheus/puts.rb
matheus-0.2.1 lib/matheus/puts.rb
matheus-0.2.0 lib/matheus/puts.rb