Class: RubyBreaker::TypeDefs::OptionalType

Inherits:
Type
  • Object
show all
Defined in:
lib/rubybreaker/type/type.rb

Overview

This class respresents an optional argument type

Instance Attribute Summary collapse

Attributes inherited from Type

#ctx

Instance Method Summary collapse

Methods inherited from Type

#eql?, #subtype_of?, #unparse

Constructor Details

#initialize(type, *args) ⇒ OptionalType

Returns a new instance of OptionalType.



192
193
194
195
# File 'lib/rubybreaker/type/type.rb', line 192

def initialize(type,*args)
  super(*args)
  @type = type
end

Instance Attribute Details

#typeObject

This accessor sets/gets the inner type of this optional type.



190
191
192
# File 'lib/rubybreaker/type/type.rb', line 190

def type
  @type
end