class Patterns::Admin
An example class to show how the observer pattern can be practically applied This example uses Inheritance but could also use Object Composition.
Public Class Methods
new(name, email)
click to toggle source
Initializes the Admin class and the Observer superclass
Examples
=> admin = Admin.new('Chris', 'ccooper@sessionm.com')
Calls superclass method
Patterns::Observer.new
# File app/models/observer/admin.rb, line 16 def initialize(name, email) super() @name = name @email = email end