Class: Yoda::Model::Types::UnknownType

Inherits:
Base
  • Object
show all
Defined in:
lib/yoda/model/types/unknown_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #map

Constructor Details

#initialize(name = 'unknown') ⇒ UnknownType

Returns a new instance of UnknownType.

Parameters:

  • name (String) (defaults to: 'unknown')


8
9
10
# File 'lib/yoda/model/types/unknown_type.rb', line 8

def initialize(name = 'unknown')
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/yoda/model/types/unknown_type.rb', line 5

def name
  @name
end

Instance Method Details

#change_root(path) ⇒ self

Parameters:

Returns:

  • (self)


23
24
25
# File 'lib/yoda/model/types/unknown_type.rb', line 23

def change_root(path)
  self
end

#eql?(another) ⇒ Boolean

Parameters:

  • another (Object)

Returns:

  • (Boolean)


13
14
15
# File 'lib/yoda/model/types/unknown_type.rb', line 13

def eql?(another)
  another.is_a?(UnknownType)
end

#hashObject



17
18
19
# File 'lib/yoda/model/types/unknown_type.rb', line 17

def hash
  [self.class.name, name].hash
end

#resolve(registry) ⇒ Array<YARD::CodeObjects::Base>

Parameters:

  • registry (Registry)

Returns:

  • (Array<YARD::CodeObjects::Base>)


29
30
31
# File 'lib/yoda/model/types/unknown_type.rb', line 29

def resolve(registry)
  []
end

#to_sString

Returns:

  • (String)


34
35
36
# File 'lib/yoda/model/types/unknown_type.rb', line 34

def to_s
  'any'
end