Module: BeanSprout::PackagePrivate::InternalClass

Included in:
Bean, Sprout, SproutBunch
Defined in:
lib/bean_sprout/package_private.rb

Overview

A module to be included by the delegatee.

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#public_interfaceObject (readonly)

The public interface, set by PublicInterfaceBase.



9
10
11
# File 'lib/bean_sprout/package_private.rb', line 9

def public_interface
  @public_interface
end

Class Method Details

.included(klass) ⇒ Object



11
12
13
# File 'lib/bean_sprout/package_private.rb', line 11

def self.included klass
  klass.extend ClassMethods
end

Instance Method Details

#bind_public_interface(public_interface) ⇒ Object



15
16
17
18
19
# File 'lib/bean_sprout/package_private.rb', line 15

def bind_public_interface public_interface
  raise "Cannot bind public interface to null." if public_interface.nil?
  raise "Cannot bind public interface twice." unless @public_interface.nil?
  @public_interface = public_interface
end