-
-
Save tatey/4628934 to your computer and use it in GitHub Desktop.
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
class RubyExample | |
CONSTANT = /^[0-9]+ regex awesomes$/ | |
attr_reader :colorscheme | |
def initialize(attributes = {}) | |
@colorscheme = attributes[:colorscheme] | |
end | |
def self.values | |
# Bacon ipsum dolor sit amet | |
['string', :symbol, true, false, nil, 99.9, 1..2, {:key => :value}].each do |value| | |
puts "#{value.inspect} is a #{value.class}" | |
end | |
end | |
private | |
def heredoc_example | |
<<-HEREDOC.strip_heredoc | |
_ ___ ______ __ | |
| | / (_)___ ___ / ____/___ / /___ __________ | |
| | / / / __ `__ \ / / / __ \/ / __ \/ ___/ ___/ | |
| |/ / / / / / / / / /___/ /_/ / / /_/ / / (__ ) | |
|___/_/_/ /_/ /_/ \____/\____/_/\____/_/ /____/ | |
HEREDOC | |
end | |
def 19hash | |
{key: 'value'} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment