Sha256: 6e04a9f9fe45063f85d3fec9b778dcf649c294a76b7dc8eabb4d10ee7948107c
Contents?: true
Size: 1.03 KB
Versions: 9
Compression:
Stored size: 1.03 KB
Contents
# Author:: Eric Crane (mailto:eric.crane@mac.com) # Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved. # # A Date object (does not include a time). # module Gloo module Objs class Date < Gloo::Core::Obj KEYWORD = 'date'.freeze KEYWORD_SHORT = 'date'.freeze # # The name of the object type. # def self.typename return KEYWORD end # # The short name of the object type. # def self.short_typename return KEYWORD_SHORT end # --------------------------------------------------------------------- # Messages # --------------------------------------------------------------------- # # Get a list of message names that this object receives. # def self.messages return super + %w[now] end # # Set to the current date. # def msg_now t = DateTime.now.strftime( '%Y.%m.%d' ) self.value = t $engine.heap.it.set_to t end end end end
Version data entries
9 entries across 9 versions & 1 rubygems