Class: Yardcheck::Typedef::Literal

Inherits:
Yardcheck::Typedef show all
Defined in:
lib/yardcheck/typedef.rb

Instance Method Summary collapse

Methods inherited from Yardcheck::Typedef

#+, parse

Instance Method Details

#invalid_const?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/yardcheck/typedef.rb', line 51

def invalid_const?
  !const.valid?
end

#match?(value) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/yardcheck/typedef.rb', line 39

def match?(value)
  value.is?(type_class)
end

#signatureObject



43
44
45
# File 'lib/yardcheck/typedef.rb', line 43

def signature
  type_class.inspect
end

#type_classObject



47
48
49
# File 'lib/yardcheck/typedef.rb', line 47

def type_class
  const.constant
end