Sha256: 1655cbb5d1d9cd268e12c1cf552965b1fc1c567b60ac22508fc646bbbcff57d9

Contents?: true

Size: 689 Bytes

Versions: 8

Compression:

Stored size: 689 Bytes

Contents

module Lotus
  module Config
    # Collects all the settings for a given framework configuration and then
    # forwards them when the application is loaded.
    #
    # @since 0.2.0
    # @api private
    class FrameworkConfiguration < BasicObject
      # @since 0.2.0
      # @api private
      def initialize
        @settings = []
      end

      # @since 0.2.0
      # @api private
      def __apply(configuration)
        @settings.each do |(m, args, blk)|
          configuration.public_send(m, *args, &blk)
        end
      end

      # @since 0.2.0
      # @api private
      def method_missing(m, *args, &blk)
        @settings.push([m, args, blk])
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lotusrb-0.5.0 lib/lotus/config/framework_configuration.rb
lotusrb-0.4.1 lib/lotus/config/framework_configuration.rb
lotusrb-0.4.0 lib/lotus/config/framework_configuration.rb
lotusrb-0.3.2 lib/lotus/config/framework_configuration.rb
lotusrb-0.3.1 lib/lotus/config/framework_configuration.rb
lotusrb-0.3.0 lib/lotus/config/framework_configuration.rb
lotusrb-0.2.1 lib/lotus/config/framework_configuration.rb
lotusrb-0.2.0 lib/lotus/config/framework_configuration.rb