Class: DMap::Helpers

Inherits:
Object
  • Object
show all
Defined in:
lib/dmap/core.rb

Class Method Summary collapse

Class Method Details

.run(command) ⇒ Object



86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/dmap/core.rb', line 86

def self.run(command)
  return command unless command.is_a? String

  case command.downcase
    when "time.now"
      "proc => { Time.now }"
    when "datetime.now"
      "proc => { DateTime.now }"
    else
      command
  end
end