class Fried::Typings::Is
Checks if the object {#is_a?} object of the passed type
Attributes
type[R]
Public Class Methods
new(type)
click to toggle source
# File lib/fried/typings/is.rb, line 17 def initialize(type) @type = type end
Public Instance Methods
valid?(obj)
click to toggle source
# File lib/fried/typings/is.rb, line 21 def valid?(obj) return type.valid?(obj) if type < Type obj.is_a?(type) end