class RubyBreaker::TypeDefs::FusionType

This class represents any object that has certain methods whose types are same as the given nominal type’s counterparts. Usage: nominal_type

Attributes

nom_type[RW]

This accessor sets/gets the nominal type to which the method names are bound.

Public Class Methods

new(nom_type,meth_names=[],*args) click to toggle source
Calls superclass method RubyBreaker::TypeDefs::DuckType::new
# File lib/rubybreaker/type/type.rb, line 140
def initialize(nom_type,meth_names=[],*args)
  super(meth_names,*args)
  @nom_type = nom_type
end

Public Instance Methods

mod() click to toggle source

This method gets the actual module of the nominal type for this fusion type. This is a shorthand for t1.nom_type.mod().

# File lib/rubybreaker/type/type.rb, line 147
def mod()
  return @nom_type.mod
end