bolshakov / stoplight

:traffic_light: Traffic control for code.
http://bolshakov.github.io/stoplight/
MIT License
384 stars 40 forks source link

Create simple writers for class variables #21

Closed tfausak closed 10 years ago

tfausak commented 10 years ago

Instead of combined getters and setters for the data store (and notifiers in #20), we should just use regular getters and setters.

module Stoplight
  @data_store = Stoplight::DataStore::Memory.new
  attr_accessor :data_store
end

Stoplight.data_store
# => #<Stoplight::DataStore::Memeory...>

Stoplight.data_store = Stoplight::DataStore::Redis.new(...)