For 2023 - we are now fully retired from IT training. We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.
Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!
I am also active in many other area and still look after a lot of web sites - you can find an index ((here)) |
Blessing in Perl / Member variable in Ruby
How do you decide what member variables you have in an object in Ruby? Well - in Perl, you bless a single hash (or, exceptionally, a list or a scaler), but in Ruby you refer to each variable that you wish to be a member of each object using a preceeding @ character.
Perl:
bless \%abc;
Ruby:
@abc = ... (written 2006-12-14)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles R105 - Ruby - Classes and Objects [1925] Introduction to Object Oriented Programming - (2008-12-06) [2292] Object Orientation in Ruby - intermediate examples - (2009-07-16) [2603] Ruby objects - a primer - (2010-01-29) [2609] Scope of variables - important to Ruby on Rails - (2010-01-31) [2616] Defining a static method - Java, Python and Ruby - (2010-02-01) [2651] Calculation within objects - early, last minute, or cached? - (2010-02-26) [3421] Ruby off the Rails? - (2011-09-06) [4009] Clear, concise examples - Ruby classes and objects. - (2013-02-17) [4502] Reading and parsing a JSON object in Ruby - (2015-06-01) P213 - Perl - Creating your own Classes [227] Bellringing and Programming and Objects and Perl - (2005-02-25) [246] When to bless a Perl variable - (2005-03-15) [975] Answering ALL the delegate's Perl questions - (2006-12-09) [1320] Perl for Larger Projects - Object Oriented Perl - (2007-08-25) [1435] Object Oriented Programming in Perl - Course - (2007-11-18) [1664] Example of OO in Perl - (2008-06-03) [1864] Object Oriented Perl - First Steps - (2008-11-01) [2169] When should I use OO techniques? - (2009-05-11) [2834] Teaching examples in Perl - third and final part - (2010-06-27) [2877] Further more advanced Perl examples - (2010-07-19) [2969] What does blessing a variable in Perl mean? - (2010-09-24) [3059] Object Orientation in an hour and other Perl Lectures - (2010-11-18) [3098] Learning Object Orientation in Perl through bananas and perhaps Moose - (2010-12-21) [3833] Learning to use existing classes in Perl - (2012-08-10) [4607] Classes and object - first steps in Perl 6 - (2016-01-02)
Some other Articles
Ruby v Perl - interpollating variablesputs - opposite of chomp in RubyEquality in Ruby - == eql? and equal?Cardinal numbers and magic numbersBlessing in Perl / Member variable in RubyNotes from the white boardFinalist reception - Wiltshire Business of the YearStreet SceneEmpty seats, Nodding Donkeys and busesWellhouse Manor, Hotel, Melksham
|
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page
This is a page archived from The Horse's Mouth at
http://www.wellho.net/horse/ -
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).
|
|