struct Datetime

Included Modules

Defined in:

cli/data/datetime.cr
cli/proto/Datetime.pb.cr

Constant Summary

FIELDS = {1 => {name: :value, pb_type: :string, crystal_type: String, cast_type: String, native: true, optional: false, repeated: false, default: nil, packed: false}} of Int32 => HashLiteral(Symbol, ASTNode)
Fields = {} of String => Field

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(buf : Protobuf::Buffer) #

def self.new(value : String) #

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(time : Time) #

[View source]

Class Method Detail

def self.from_protobuf(io) #

Instance Method Detail

def [](key : String) #

def []=(key : String, val) #

def []?(key : String) #

def inspect(io : IO) #
Description copied from struct Struct

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"

[View source]
def time #

[View source]
def to_hash #

def to_json(io : IO) #

[View source]
def to_protobuf(io : IO, embedded = false) #

def to_protobuf #

def to_s(io : IO) #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def value : String #

def value=(value : String) #