Class: WebFunction::Type::Any

Inherits:
Object
  • Object
show all
Defined in:
lib/webfunction/type/any.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



26
27
28
# File 'lib/webfunction/type/any.rb', line 26

def ==(other)
  other.is_a?(Any)
end

#base_type ⇒ Object



6
7
8
# File 'lib/webfunction/type/any.rb', line 6

def base_type
  "any"
end

#format(_format = :default) ⇒ Object



18
19
20
# File 'lib/webfunction/type/any.rb', line 18

def format(_format = :default)
  "any"
end

#hash ⇒ Object



31
32
33
# File 'lib/webfunction/type/any.rb', line 31

def hash
  Any.hash
end

#inspect ⇒ Object



14
15
16
# File 'lib/webfunction/type/any.rb', line 14

def inspect
  "#<any>"
end

#objects ⇒ Object



35
36
37
# File 'lib/webfunction/type/any.rb', line 35

def objects
  []
end

#refinement ⇒ Object



10
11
12
# File 'lib/webfunction/type/any.rb', line 10

def refinement
  nil
end

#to_s ⇒ Object



22
23
24
# File 'lib/webfunction/type/any.rb', line 22

def to_s
  format(:default)
end

#valid?(_value) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/webfunction/type/any.rb', line 43

def valid?(_value)
  true
end

#without_refinements ⇒ Object



39
40
41
# File 'lib/webfunction/type/any.rb', line 39

def without_refinements
  self
end