search for: private_class_method

Displaying 4 results from an estimated 4 matches for "private_class_method".

2008 Jan 17
6
how to control self.method access
i think self.method just like class method,so if i want to define it as a private method,i should use private_class_method :my_method but i found follow code in < <Agile Web Development with Rails>> private def self.hash_password(password) Digest::SHA1.hexdigest(password) end just a mistake or there have some thing which i cannot get? --~--~---------~--~----~------------~-------~--~----~ You received t...
2006 Jan 16
4
Question about self and private
Hi! There''s something I don''t understand yet about static/private methods. I hope someone can explain... E.g.: class SayHello def hello(who) puts "Hello, " + who + "!" end def self.say(words) puts words end end hello = SayHello.new hello.hello "World" : Hello World! hello.say "hi" : Error SayHello.say
2012 Sep 22
4
Class, Module, Object
>> reload! Reloading... => true >> puts Class < Module true => nil >> puts Module < Class false => nil >> puts Module < Object true => nil >> puts Object < Module false => nil >> Object.parent => Object The above indicates that the Class object instance inherits from the Module object instance and the Module object instance
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde