ga-wdi-boston / ruby-object-inheritance Goto Github PK
View Code? Open in Web Editor NEWLearn about inheritance in Ruby
License: Other
Learn about inheritance in Ruby
License: Other
under "Lab: Model Shapes Using Classes" @raq929
ie, Test your code using bin/rake test
@raq929 requested an issue be opened to review the tests for rectangle because they could be improved. She will add more information as a comment after she completes the lecture.
Use private attr_reader
method for rectangle instead.
@jrhorn424 had a brain weasel about maybe not using super in this instance:
# Class that describes a square
class Square < Rectangle
def initialize(side_length)
super(side_length, side_length)
end
end
@gaand is there a reason you can think of not to do this? (Currently on the solution branch.)
def calculate_area
- (@num_sides * @side_length**2) / (4 * Math.tan(Math::PI / @num_sides))
+ (num_sides * side_length**2) / (4 * Math.tan(Math::PI / num_sides))
end
Please take a picture and paste in the comments.
Issues passing the test on calculating area during delivery.
There is a square spec on the solution branch, but not on master. The spec should be on master.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.