githubnext / githubnext/monaspace

Add Ruby code preview to website

Offen
#40 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
19.6k
Forks
322
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ruby
Bereich
web-dev
Issue-Typ
Feature
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.