lib/lionel/configuration.rb in lionel_richie-0.1.5.1 vs lib/lionel/configuration.rb in lionel_richie-0.2.0

- old
+ new

@@ -2,10 +2,11 @@ require 'ostruct' module Lionel class Configuration include Singleton + extend Forwardable attr_reader :path, :data FILE_NAME = '.lionelrc' CONFIG_ACCESSORS = [ :trello_key, :trello_token, :trello_board_id, @@ -13,10 +14,10 @@ :google_client_id, :google_client_secret, :google_doc_id ] def self.config_accessor(*args) - delegate(*args, to: :data) + def_delegators :data, *args args.each do |accessor| define_method("#{accessor}=") do |value| data.send("#{accessor}=", value) write