Sha256: 070f06062a39d59ecc295d78ea287c624fc41cfa2a869ce809f309d93451dbc3
Contents?: true
Size: 644 Bytes
Versions: 1
Compression:
Stored size: 644 Bytes
Contents
require "go_social/version" module GoSocial def self.names %w{facebook pinterest twitter} end def self.config name = nil, &block context = name ? "GoSocial::#{name.to_s.camelize}".constantize : self block_given? ? yield(context) : context end # add class method for each social widgets registered names.each do |name| (class << self; self; end).send :define_method, name do |&block| clazz = "GoSocial::#{name.to_s.camelize}".constantize block_given? ? clazz.instance_eval(&block) : clazz end end end require "go_social/view_helper" require "go_social/engine" if defined?(::Rails::Engine)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
go_social-0.0.1 | lib/go_social.rb |