Sha256: cab5c0fe0ab495576b71f43e75206aa43e9790810da115949de1a3a29fde9b3e

Contents?: true

Size: 268 Bytes

Versions: 7

Compression:

Stored size: 268 Bytes

Contents

# config accessors
class Module
  def config_accessor(*symbols)
    symbols.each do |sym|
      class_eval %{
        def #{sym}
          config.#{sym}
        end
        
        def #{sym}=(val)
          config.#{sym} = val
        end
      }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
on_irc-2.1.5 lib/on_irc/config_accessor.rb
on_irc-2.1.4 lib/on_irc/config_accessor.rb
on_irc-2.1.3 lib/on_irc/config_accessor.rb
on_irc-2.1.1 lib/on_irc/config_accessor.rb
on_irc-2.1.0 lib/on_irc/config_accessor.rb
on_irc-2.0.1 lib/on_irc/config_accessor.rb
on_irc-2.0.0 lib/on_irc/config_accessor.rb