classroom

https://github.com/education/classroom

Ruby

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.

GitHubClassroom::Mobile.mobile_user_agent?

Public: Does the user agent say that we're on a mobile device?

user_agent - Browser user agent string to check for mobile.

Returns a boolean.

Source | Google | Stack overflow

Edit

git clone [email protected]:education/classroom.git

cd classroom

open lib/github_classroom/mobile.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-GitHubClassroom--Mobile-mobile_user_agent--for-pr


# Commit to git

git add lib/github_classroom/mobile.rbgit commit -m "better docs for GitHubClassroom::Mobile.mobile_user_agent?"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-GitHubClassroom--Mobile-mobile_user_agent--for-pr

hub pull-request


# Celebrate!