Class: Unpatched::Wrapper

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

Direct Known Subclasses

MultiWrapper, NormalWrapper

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Wrapper

Returns a new instance of Wrapper.



52
53
54
# File 'lib/unpatched.rb', line 52

def initialize(value)
  @value = Utils.unwrapped(value)
end

Class Method Details

.const_missing(const) ⇒ Object



39
# File 'lib/unpatched.rb', line 39

def self.const_missing(const) ::Unpatched.const_get(const) end

Instance Method Details

#and(value = (undefined = true)) ⇒ Object Also known as: but



60
61
62
63
64
65
66
67
# File 'lib/unpatched.rb', line 60

def and(value = (undefined = true))
  return self if undefined
  if Wrapper === value
    Utils.wrapped @value + unwrapped(value)
  else
    MultiWrapper.new self, value
  end
end

#inspectObject



56
57
58
# File 'lib/unpatched.rb', line 56

def inspect
  @value.inspect
end