Sha256: deaa66ac6bd10fb66612f5f9be477a3801cfa8b62be4f03623a210919437bfcb

Contents?: true

Size: 280 Bytes

Versions: 24

Compression:

Stored size: 280 Bytes

Contents

require 'active_support/inflector'

module Brightcontent
  Resource = Struct.new(:path) do
    def klass
      path.classify.constantize
    rescue
      "Brightcontent::#{path.classify}".constantize
    end

    def to_partial_path
      "application/resource"
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
brightcontent-core-2.6.0 lib/brightcontent/resource.rb
brightcontent-core-2.5.1 lib/brightcontent/resource.rb
brightcontent-core-2.5.0 lib/brightcontent/resource.rb
brightcontent-core-2.4.6 lib/brightcontent/resource.rb
brightcontent-core-2.4.5 lib/brightcontent/resource.rb
brightcontent-core-2.4.4 lib/brightcontent/resource.rb
brightcontent-core-2.4.3 lib/brightcontent/resource.rb
brightcontent-core-2.4.2 lib/brightcontent/resource.rb
brightcontent-core-2.4.1 lib/brightcontent/resource.rb
brightcontent-core-2.4.0 lib/brightcontent/resource.rb
brightcontent-core-2.3.4 lib/brightcontent/resource.rb
brightcontent-core-2.3.3 lib/brightcontent/resource.rb
brightcontent-core-2.3.2 lib/brightcontent/resource.rb
brightcontent-core-2.3.1 lib/brightcontent/resource.rb
brightcontent-core-2.3.0 lib/brightcontent/resource.rb
brightcontent-core-2.2.2 lib/brightcontent/resource.rb
brightcontent-core-2.2.1 lib/brightcontent/resource.rb
brightcontent-core-2.2.0 lib/brightcontent/resource.rb
brightcontent-core-2.1.5 lib/brightcontent/resource.rb
brightcontent-core-2.1.4 lib/brightcontent/resource.rb