Class: Types::Typed::TimestampType

Inherits:
ValueType show all
Defined in:
lib/solidity/typed/metatypes/types.rb

Overview

note: datetime is int (epoch time since 1970 in seconds in utc)

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#array?, #check_and_normalize_literal, #eql?, #hash, #mapping?, #parse_integer, #pretty_print, #raise_type_error

Class Method Details

.instanceObject



267
# File 'lib/solidity/typed/metatypes/types.rb', line 267

def self.instance()  @instance ||= new; end

Instance Method Details

#==(other) ⇒ Object

check for abi sig format is it uint32 ???



274
# File 'lib/solidity/typed/metatypes/types.rb', line 274

def ==(other)  other.is_a?( TimestampType ); end

#formatObject Also known as: to_s



269
# File 'lib/solidity/typed/metatypes/types.rb', line 269

def format() 'timestamp'; end

#mut?Boolean

Returns:

  • (Boolean)


280
# File 'lib/solidity/typed/metatypes/types.rb', line 280

def mut?() false; end

#new(initial_value) ⇒ Object



283
# File 'lib/solidity/typed/metatypes/types.rb', line 283

def new( initial_value ) Timestamp.new( initial_value ); end

#typedclassObject



278
# File 'lib/solidity/typed/metatypes/types.rb', line 278

def typedclass()       Timestamp;  end

#typedclass_nameObject



277
# File 'lib/solidity/typed/metatypes/types.rb', line 277

def typedclass_name()  Timestamp.name; end

#zeroObject Also known as: new_zero



281
# File 'lib/solidity/typed/metatypes/types.rb', line 281

def zero() Timestamp.zero; end