Created
August 2, 2018 23:41
-
-
Save buren/0b46c1c14843bb39349962b6e9315f8d to your computer and use it in GitHub Desktop.
Atom snippet - Ruby gem configuration template
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
'.source.ruby': | |
'Insert gem configuration block': | |
'prefix': 'gconfig' | |
'body': | |
''' | |
def self.configuration | |
@configuration ||= Configuration.new | |
end | |
def self.config | |
configuration | |
end | |
def self.configure | |
yield(configuration) if block_given? | |
configuration | |
end | |
class Configuration | |
attr_accessor :${1} | |
def initialize | |
@${1} | |
end | |
end | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment