Sha256: 2be161c78e35635af30950228dcd8736d4b1af0121dd3e75e8d94fe8626c8887

Contents?: true

Size: 385 Bytes

Versions: 2

Compression:

Stored size: 385 Bytes

Contents

#:enddoc:
module RailsConnector
  class ObjClass
    attr_reader :name

    def initialize(data)
      @name, @attributes = data['name'], data['attributes']
    end

    def self.by_name(name)
      data = Workspace.current.obj_classes[name.to_s]
      new(data) if data
    end

    def has_attribute?(attribute_name)
      @attributes.include?(attribute_name.to_s)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
infopark_cloud_connector-6.8.0.beta.200.713.e5c3150 lib/rails_connector/obj_class.rb
infopark_cloud_connector-6.8.0.beta.200.681.7c84f4a lib/rails_connector/obj_class.rb