Last active
December 11, 2015 15:19
-
-
Save nathanaelkane/4620585 to your computer and use it in GitHub Desktop.
Ruby code example for showcasing editor colorschemes/themes. Suggestions are welcome :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support' | |
module VimColors | |
class RubyExample | |
CONSTANT = /^[0-9]+ regex awesomes$/ | |
attr_reader :colorscheme | |
# TODO: Bacon ipsum dolor sit amet | |
def initialize(attributes = {}) | |
@colorscheme = attributes[:colorscheme] | |
end | |
def self.examples | |
# Bacon ipsum dolor sit amet | |
['string', :symbol, true, false, nil, 99.9, 1..2].each do |value| | |
puts "it appears that #{value.inspect} is a #{value.class}" | |
end | |
{:key1 => :value1, key2: 'value2'}.each do |key, value| | |
puts "the #{key.inspect} key has a value of #{value.inspect}" | |
end | |
%w[One Two Three].each { |number| puts number } | |
end | |
private | |
def heredoc_example | |
<<-SQL | |
SELECT * | |
FROM colorschemes | |
WHERE background = 'dark' | |
SQL | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment