Class: Matheus::Puts

Inherits:
Command show all
Defined in:
lib/matheus/puts.rb

Overview

Usage:

$ puts "Date.today"
2024-08-26

Instance Method Summary collapse

Methods inherited from Command

call

Methods included from StringFormat

#bold, #error, #red

Methods included from Result::Methods

#Failure, #Success

Instance Method Details

#call(argv) ⇒ Object



10
11
12
13
14
# File 'lib/matheus/puts.rb', line 10

def call(argv)
  puts eval(argv.join(" ")) # standard:disable Security/Eval
rescue Exception => e # standard:disable Lint/RescueException
  Failure(e.message)
end