githubnext / githubnext/monaspace
Add Ruby code preview to website
- Dominant language
- Shell
- Stars
- 19.6k
- Forks
- 322
- PR merge metrics
- No merged PRs in 30d
Description
I want to see how it looks with Ruby source code.

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
```
Contributor guide
No contributing guide indexed for this repository
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100