Skip to content

Instantly share code, notes, and snippets.

@nathanaelkane
Last active December 11, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nathanaelkane/4620585 to your computer and use it in GitHub Desktop.
Save nathanaelkane/4620585 to your computer and use it in GitHub Desktop.
Ruby code example for showcasing editor colorschemes/themes. Suggestions are welcome :)
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