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



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

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

Instance Method Details

#==(other) ⇒ Object

check for abi sig format is it uint32 ???



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

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

#formatObject Also known as: to_s



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

def format() 'timestamp'; end

#mut?Boolean

Returns:

  • (Boolean)


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

def mut?() false; end

#new(initial_value) ⇒ Object



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

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

#typedclassObject



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

def typedclass()       Timestamp;  end

#typedclass_nameObject



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

def typedclass_name()  Timestamp.name; end

#zeroObject Also known as: new_zero



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

def zero() Timestamp.zero; end