class Aquarium::InvarCond

Attributes

invar[R]

Public Class Methods

new() click to toggle source
   # File examples/design_by_contract_example.rb
60 def initialize 
61   @invar = 0
62 end

Public Instance Methods

bad_action() click to toggle source
   # File examples/design_by_contract_example.rb
67 def bad_action
68   p "inside :bad_action"
69   @invar = 1
70 end
good_action() click to toggle source
   # File examples/design_by_contract_example.rb
64 def good_action
65   p "inside :good_action"
66 end