Class: ScaleRb::OldRegistry::TypeExp::NamedType

Inherits:
Object
  • Object
show all
Defined in:
lib/scale_rb/old_registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, params) ⇒ NamedType

Returns a new instance of NamedType.



322
323
324
325
# File 'lib/scale_rb/old_registry.rb', line 322

def initialize(name, params)
  @name = name
  @params = params
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



320
321
322
# File 'lib/scale_rb/old_registry.rb', line 320

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params.



320
321
322
# File 'lib/scale_rb/old_registry.rb', line 320

def params
  @params
end

Instance Method Details

#to_sObject



327
328
329
# File 'lib/scale_rb/old_registry.rb', line 327

def to_s
  params.empty? ? name : "#{name}<#{params.map(&:to_s).join(', ')}>"
end