Sha256: ee8108a602fe25b15ea2be69113a685b0b9e81ab20111a438f3bd2cd50433aac

Contents?: true

Size: 592 Bytes

Versions: 8

Compression:

Stored size: 592 Bytes

Contents

module Lingohub
  module Models
    class Resource
      attr_accessor :locale

      STRATEGY_UPDATE_AND_CREATE = 'update_and_create'
      STRATEGY_MASTER_LOCALE_STRUCTURE = 'master_locale_structure'
      STRATEGY_OVERRIDE ='override'
      STRATEGIES = [STRATEGY_MASTER_LOCALE_STRUCTURE, STRATEGY_UPDATE_AND_CREATE, STRATEGY_OVERRIDE]

      def initialize(client, locale, link)
        @client = client
        @locale = locale
        @link   = link
      end

      # Downloads the resource content
      def content
        @content ||= @client.get(@link)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lingohub-0.7.0 lib/lingohub/models/resource.rb
lingohub-0.6.1 lib/lingohub/models/resource.rb
lingohub-0.6.0 lib/lingohub/models/resource.rb
lingohub-0.5.0 lib/lingohub/models/resource.rb
lingohub-0.4.1 lib/lingohub/models/resource.rb
lingohub-0.4.0 lib/lingohub/models/resource.rb
lingohub-0.3.1 lib/lingohub/models/resource.rb
lingohub-0.2.1 lib/lingohub/models/resource.rb