staszek / easycrumbs Goto Github PK
View Code? Open in Web Editor NEWEasy breadcrumbs for your website
License: MIT License
Easy breadcrumbs for your website
License: MIT License
Body
Body of remove task
Please add those 4 methods:
like!
– increment number of likesdislike!
– increment number of dislikespoints
– number of likes minus number of dislikesvotes
– number of likes plus number of dislikesThis gem look awesome but it does not work with Rails 3 ...
Are you planning to fork it ? Are you aware of somebody doing it ?
Body of the new task
Please create Article class. It should have 6 instance values with setters and getters.
title
- Getterbody
- Getterauthor
- Gettercreated_at
- Getterlikes
- Getter and Setterdislikes
- Getter and SetterVisit interactive tutorial at tryruby.org and finish it.
Body
The save
method should accept an array of articles and save them as a files.
_
. Extensions is .article
||
It is hard task. Lets think about it first.
Please create WebPage class.
.article
files. If it is not passed when creating new object use /
path by default.@articles
instance variable.load
and save
methods to load and save articles from files.new_article
method to create new articles.It should find all .article
files in directory and returns an array of articles read from disk
Body of remove task
Please add those 4 methods:
long_lines
– returns an array of lines longer than 80 signslength
– returns length of a bodytruncate
– accepts limit as an argument. If body is longer than limit this method should cut the body and insert ...
at the end. Returned string should never be longer than limit.contain?
– returns true if body contain a given string or regexpPlease create 6 methods to get articles in different ways:
longest_articles
– return array of articles sorted by longest onebest_articles
– return array of articles sorted by pointsworst_articles
– the same as above but reversedbest_article
– return article with the most points. Raise NoArticlesFound exception if web page does not have any articlesworst_article
– return article with the less points. Raise NoArticlesFound exception if web page does not have any articlesmost_controversial_articles
– return array of articles sorted by votesBody of the new task
search(query)
method should return only articles which contains the query. Argumen can be a string or regexp.
Another test
Please create those 4 methods
votes
- return sum of votes from all articlesauthors
- return array of authorauthors_statistics
- return hash where author is a key and number of its articles is a value. Something like: 'John' => 3, 'Alice' => 1
best_author
- return author with the most articlesBody of the second task
Test
ruby tests.rb
.Create a class ArticlesFileSystem. Add constructor which accepts directory as an argument.
Add some colors to README code snippets
Visit interactive tutorial at try.github.com and finish it
Body of the second task
Another test
Body
Constructor should accept 3 parameters: title, body, author
. Please make the 3rd obsolete to allow create an article without an author. Constructor should also set created_at variable to current time. Number of likes and dislikes should be set to 0
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.