Class: WebFunction::Type::Any

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

Instance Method Summary collapse

Instance Method Details

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



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

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

#base_typeObject



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

def base_type
  "any"
end

#format(_format = :default) ⇒ Object



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

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

#hashObject



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

def hash
  Any.hash
end

#inspectObject



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

def inspect
  "#<any>"
end

#objectsObject



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

def objects
  []
end

#refinementObject



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

def refinement
  nil
end

#to_sObject



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

def to_s
  format(:default)
end

#valid?(_value) ⇒ Boolean

Returns:

  • (Boolean)


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

def valid?(_value)
  true
end

#without_refinementsObject



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

def without_refinements
  self
end