Sha256: bacfb8367775590e80a594953bbc54b08f9f79cc6e551b69c4563183aad3b00e

Contents?: true

Size: 492 Bytes

Versions: 6

Compression:

Stored size: 492 Bytes

Contents

# encoding: UTF-8

module GoodData
  module Model
    class MdObject
      attr_accessor :name, :title

      def visual
        "TITLE \"#{title_esc}\""
      end

      def title_esc
        title.gsub(/"/, "\\\"")
      end

      ##
      # Generates an identifier from the object name by transliterating
      # non-Latin character and then dropping non-alphanumerical characters.
      #
      def identifier
        @identifier ||= "#{type_prefix}.#{name}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gooddata-0.6.7 lib/gooddata/models/md_object.rb
gooddata-0.6.6 lib/gooddata/models/md_object.rb
gooddata-0.6.5 lib/gooddata/models/md_object.rb
gooddata-0.6.4 lib/gooddata/models/md_object.rb
gooddata-0.6.3 lib/gooddata/models/md_object.rb
gooddata-0.6.2 lib/gooddata/models/md_object.rb