Class: AnyValue::Anything

Inherits:
Object
  • Object
show all
Defined in:
lib/any_value.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Anything

Returns a new instance of Anything.



19
20
21
# File 'lib/any_value.rb', line 19

def initialize(*args)
  @args = args
end

Instance Method Details

#==Object



23
24
25
# File 'lib/any_value.rb', line 23

def ==(*)
  true
end

#^(other) ⇒ Object



31
32
33
# File 'lib/any_value.rb', line 31

def ^(other)
  Composite.new(self, other)
end

#inspectObject



27
28
29
# File 'lib/any_value.rb', line 27

def inspect
  "#<%s>" % self.class.name.sub("Anything::", "")
end

#to_aryObject



35
36
37
# File 'lib/any_value.rb', line 35

def to_ary
  self
end

#to_strObject



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

def to_str
  self
end