Displaying 1 result from an estimated 1 matches for "scaledemo".
2007 Mar 29
0
Trouble with Rails and Lib-Based modules
...n the class, all that is returned is a
pound sign. Does anyone have any idea why it is outputting this? I used
the module examples from the Programming Ruby book''s site , and this
code:
class TestModelController < ApplicationController
def index
require ''ScaleDemo''
validate = ScaleDemo.new
render :text => validate.to_s
# Always returns "#"
end
end
lib/ScaleDemo.rb
module MajorScales
def majorNum
@numNotes = 7 if @numNotes.nil?
@numNotes # Return 7
end
end
module PentatonicScales...