Class: ContractType

Inherits:
TypedVariable show all
Defined in:
lib/0xfacet/typed/contract_type.rb

Defined Under Namespace

Classes: Proxy

Instance Attribute Summary

Attributes inherited from TypedVariable

#on_change, #value

Instance Method Summary collapse

Methods inherited from TypedVariable

#!=, #==, #as_json, create, create_or_validate, #deserialize, #eql?, #hash, #to_s

Methods included from AttrPublicReadPrivateWrite

#attr_public_read_private_write

Constructor Details

#initializeContractType

Returns a new instance of ContractType.



2
3
4
# File 'lib/0xfacet/typed/contract_type.rb', line 2

def initialize(...)
  super(...)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, **kwargs, &block) ⇒ Object



10
11
12
# File 'lib/0xfacet/typed/contract_type.rb', line 10

def method_missing(name, *args, **kwargs, &block)
  value.send(name, *args, **kwargs, &block)
end

Instance Method Details

#respond_to_missing?(name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/0xfacet/typed/contract_type.rb', line 14

def respond_to_missing?(name, include_private = false)
  value.respond_to?(name, include_private) || super
end

#serializeObject



6
7
8
# File 'lib/0xfacet/typed/contract_type.rb', line 6

def serialize
  value.address
end