Class: BCDD::Contract::Core::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdd/contract/core/proxy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Proxy

Returns a new instance of Proxy.



15
16
17
# File 'lib/bcdd/contract/core/proxy.rb', line 15

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



13
14
15
# File 'lib/bcdd/contract/core/proxy.rb', line 13

def object
  @object
end

Class Method Details

.[](object) ⇒ Object



5
6
7
# File 'lib/bcdd/contract/core/proxy.rb', line 5

def self.[](object)
  new(object)
end

.to_procObject



9
10
11
# File 'lib/bcdd/contract/core/proxy.rb', line 9

def self.to_proc
  ->(object) { new(object) }
end