asciinema.org/app/models/theme.rb

22 lines
388 B
Ruby
Raw Normal View History

class Theme < Struct.new(:name, :label)
AVAILABLE = {
2015-10-18 15:52:11 +00:00
'asciinema' => 'asciinema',
'tango' => 'Tango',
'solarized-dark' => 'Solarized Dark',
'solarized-light' => 'Solarized Light',
2015-10-18 15:52:11 +00:00
'monokai' => 'Monokai',
}
2015-10-18 15:52:11 +00:00
DEFAULT = 'asciinema'
def self.default
new(DEFAULT, AVAILABLE[DEFAULT])
end
def self.for_name(name)
new(name, AVAILABLE[name])
end
end