Sha256: 0d39c42130c210a681b4352ea5ad13124186ea518795bd7539804777619ea0dd

Contents?: true

Size: 467 Bytes

Versions: 10

Compression:

Stored size: 467 Bytes

Contents

require "json"

module CCEngine
  class Config
    def initialize(json_string)
      @json_string = json_string
    end

    def include_paths
      parsed_json.fetch("include_paths")
    end

    def exclude_paths
      parsed_json.fetch("exclude_paths")
    end

    def enabled?
      parsed_json.fetch("enabled")
    end

    protected

    attr_reader :json_string

    private

    def parsed_json
      @parsed_json = JSON.parse(json_string)
    end
  end
end

Version data entries

10 entries across 8 versions & 2 rubygems

Version Path
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/codeclimate-engine-rb-0.4.1/lib/cc_engine/config.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/codeclimate-engine-rb-0.4.1/lib/cc_engine/config.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/codeclimate-engine-rb-0.4.1/lib/cc_engine/config.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/codeclimate-engine-rb-0.4.1/lib/cc_engine/config.rb
codeclimate-engine-rb-0.4.1 lib/cc_engine/config.rb
codeclimate-engine-rb-0.4.0 lib/cc_engine/config.rb
codeclimate-engine-rb-0.3.1 lib/cc_engine/config.rb
codeclimate-engine-rb-0.3.0 lib/cc_engine/config.rb
codeclimate-engine-rb-0.2.0 lib/cc_engine/config.rb
codeclimate-engine-rb-0.1.0 lib/cc_engine/config.rb