Class: ScaleRb::OldRegistry::TypeExp::NamedType
- Inherits:
-
Object
- Object
- ScaleRb::OldRegistry::TypeExp::NamedType
- Defined in:
- lib/scale_rb/old_registry.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(name, params) ⇒ NamedType
constructor
A new instance of NamedType.
- #to_s ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
320 321 322 |
# File 'lib/scale_rb/old_registry.rb', line 320 def name @name end |
#params ⇒ Object (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_s ⇒ Object
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 |