githubnext / githubnext/monaspace

Add Ruby code preview to website

Ouverte
#40 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Shell
Étoiles
19.6k
Forks
322
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I want to see how it looks with Ruby source code.

![image](https://github.com/githubnext/monaspace/assets/1383035/a67daf62-5fd9-4df1-a4a7-c8b1371e7183)

Feel free to use this snippet:
```rb
class Person
attr_accessor :name, :age

def initialize(name, age)
@name = name
@age += age
end

def ==(other)
@name == other.name && @age == other.age
end

def <=>(other)
@age <=> other.age
end

def !~(other)
@name !~ other.name || @age != other.age
end

def =~(other)
@name =~ other.name && @age == other.age
end

def <<(other)
@name << other.name
end

def >>(other)
@age >> other.age
end

def **(other)
@age ** other.age
end

def &&(other)
@name && other.name && @age && other.age
end

def ||(other)
@name || other.name || @age || other.age
end
end

alice = Person.new("Alice", 30)
bob = Person.new("Bob", 35)

puts alice == bob # => false
puts alice <=> bob # => -1
puts alice !~ bob # => true
puts alice =~ bob # => false
puts alice << bob # => "AliceBob"
puts alice >> bob # => 30
puts alice ** bob # => 9000000000000000
puts alice && bob # => true
puts alice || bob # => true
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par localiser le code du site web qui assemble les aperçus de code existants et comparez la manière dont les autres langages source sont représentés. Ajoutez l’extrait Ruby fourni à l’endroit approprié, puis vérifiez que le site web restitue correctement le code source Ruby.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
ruby
Domaine
web-dev
Type d'issue
Fonctionnalité
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.