Skip to content

Instantly share code, notes, and snippets.

@buren buren/snippets.cson
Created Aug 2, 2018

Embed
What would you like to do?
Atom snippet - Ruby gem configuration template
'.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
You can’t perform that action at this time.