githubnext / githubnext/monaspace

Add Ruby code preview to website

Aperta
#40 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
19.6k
Fork
322
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by locating the website code that assembles the existing code previews and compare how other source languages are represented. Add the supplied Ruby snippet where appropriate, then verify that the website renders the Ruby source correctly.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ruby
Ambito
web-dev
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.