Ruby is an object-oriented programming language; that much, everyone knows. But Ruby's objects work very differently from many other languages, especially if you're coming from a complied, statically typed language. In this lecture, I'll review the surprisingly simple rules that govern Ruby's objects. I discuss methods, classes, instances, and modules, and how these various pieces fit together into an integrated whole -- including such topics as inheritance, instance variables, class variables, mixins, and "include" vs. "extend".
Ruby object model - Understanding of object play role for rubyTushar Pal
This is including the Ruby Object Model Detail In which It consist a Hierarchy of Ruby Object.
This PPT Basically will solve Which Class is having which methods ?
Which Module are included or excluded ?
How a Class Work?
Role of Self?
Use of Instance ,Class Variable and Methods
Ruby is an object-oriented programming language; that much, everyone knows. But Ruby's objects work very differently from many other languages, especially if you're coming from a complied, statically typed language. In this lecture, I'll review the surprisingly simple rules that govern Ruby's objects. I discuss methods, classes, instances, and modules, and how these various pieces fit together into an integrated whole -- including such topics as inheritance, instance variables, class variables, mixins, and "include" vs. "extend".
Ruby object model - Understanding of object play role for rubyTushar Pal
This is including the Ruby Object Model Detail In which It consist a Hierarchy of Ruby Object.
This PPT Basically will solve Which Class is having which methods ?
Which Module are included or excluded ?
How a Class Work?
Role of Self?
Use of Instance ,Class Variable and Methods
A talk that covers typography topics from font choice to proper quotation mark usage. Learn how to become a better typographer and improve your web presentation.
Satisfaction 100% guaranteed by James Wu.
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2. From last time
• More about arrays
• Method
• Parameters
• Return Values
• Blocks
• How to use a block
• Parameters
3. Area Methods HW
I wanted you to make a program that uses methods to
calculate the area of various shapes. It was to be called like
this:
4. First step
We called a method called "area", using the shape name and
two side lengths as arguments.
5. Second step
The area method then called a method that calculates and
prints the area of each shape.
6. A new data type
We know that an array is a list of variables. However, arrays are
indexed using numbers. There is another data type that can
change this: a hash
A Hash is a dictionary-like collection of unique keys and their
values. While an array uses integers as its index, a Hash
allows you to use any object type.
9. Hash syntax
In general, a hash looks like this:
A hash consists of key-value pairs. Each key maps to a value.
10. Creating a hash
There is more than one way to make a hash. We already saw
the first way: typing out key and value pairs in brackets.
How would we make an empty hash?
my_hash = Hash.new
This will create a completely empty hash. Make sure to
capitalize Hash!
11. Adding to a hash
Say we create an empty hash called pets. Now we want to add
our pets to it!
12. Accessing a hash
We can access elements of a hash just like elements of an
array.
13. Your turn!
Create a hash called about_me. In the hash, put your name,
your age, and your favorite color.
15. Iterating over hashes
Last week we went over how to iterate over arrays:
We can iterate over hashes in a very similar way.
16. Iterating over hashes
Iterating over a hash is very similar to iterating over an array,
but we have to print out two different things: the key and the
value.
19. Now we get to do the cool
stuff... Object Oriented
Programming.
20. Object-Oriented
Programming
So far in Ruby we've seen a lot of variables and data types.
Numbers, strings, booleans, arrays, hashes, etc.
We can do even more!
21. Object-Oriented
Programming
In Ruby, almost everything is an object.
!
What is an object? Objects have methods, which you've seen
before, and attributes, which are just data.
!
We've even used them before without even knowing it! Take a
look.
22. Strings as objects
We have set strings to certain values before:
name = "Kelly"
!
We can also use methods with strings:
name.length
!
In this case "name" is a string object with a .length method and
a length attribute of 5.
!
"name" is now part of something called the string Class.
23. What is a class?
A class is just a way of organizing and producing objects with
similar attributes and methods.
24. What is a class?
We're going to build our own class. Let's think of a student.
Some things a student has:
name
ID
major
!
Let's define a class called Student!
25. Defining a class
First, we need to make a class for our student. Here's how to
start:
Now we have an empty class!
26. Initializing a class
Every class needs a method called initialize. When the class is
created, the initialze method will automatically be called.
!
Create an empty initialize method in the Student class:
27. Initializing a class
We wanted our student to have a name, an ID, and a major.
Let's do that!
28. Initialzing a class
In Ruby, we use @ before a variable to signify that it's an
instance variable. This means that the variable is attached to
the instance of the class.
!
Any variable defined withing the initialize function must have
an @ in front of it. This variable is now a member variable of
the class.
29. Creating objects
Our class is defined enough to create an object now! Let's
create a new student:
I just created a new Student object with name set to "Kelly",
idNum set to "123456789", and major set to "CS".
30. Creating objects
We can create a bunch of Student objects! Each one will have
its own name, ID, and major.
31. Let's make our Students do
things
What does a student do? Let's add some methods to our
Student class. A student can:
Say hi
Take a test
Freak out
32. Adding methods to classes
We added a method called sayHi! Now how do we use it?
33. Using classes
To call a method that is part of a class, just type in the name of
the class variable, then a period, then the method name:
variable_name.method_name
34. Using classes
I had a Student class called "me" and a student class called
"other". Calling the "sayHi" method on both of them will print
out:
!
Kelly says hi!
Bob says hi!
41. What we did today
• Hashes
• Creating hashes
• Putting information in hashes
• Iterating over hashes
• Classes
• Creating classes
• Putting variables and methods in classes
• Using methods in classes
42. Homework
On the next page is a very simple game that uses a class called
Player. I wrote the code to play the game for you, but you have
to write the class. You can write the methods in the class
however you want, but all the methods that are in the loop I
wrote for you have to be present.
!
The idea of the game is that two players take turns either
attacking or healing. On each turn they can choose to attack the
other player or heal themselves. You should define a variable
called health in your Player class to keep track of this. If you
want you can make the game more interesting and add in
different types of attacks that have different effects on health.