Sha256: e3217bf496eb0603a6a8bfe9a450b80f7c077441f6d3839a19142c46aaab881c

Contents?: true

Size: 373 Bytes

Versions: 6

Compression:

Stored size: 373 Bytes

Contents

module ScheduleAttributes

  class Configuration

    attr_accessor :time_format

    def initialize
      @time_format = '%H:%M'
    end
  end

  class << self
    def configure
      @configuration ||= Configuration.new
      if block_given?
        yield @configuration
      end
      return @configuration
    end
    alias_method :configuration, :configure
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
dgp-schedule_attributes-0.5.3 lib/schedule_attributes/configuration.rb
dgp-schedule_attributes-0.5.2 lib/schedule_attributes/configuration.rb
dgp-schedule_attributes-0.5.1 lib/schedule_attributes/configuration.rb
dgp-schedule_attributes-0.5.0 lib/schedule_attributes/configuration.rb
dgp-schedule_attributes-0.4.0 lib/schedule_attributes/configuration.rb
schedule_attributes-0.3.0 lib/schedule_attributes/configuration.rb