Sha256: 536cd03f740fb84400723b13a822911aebcf23128dea2df06d0c7415bfc8e196

Contents?: true

Size: 392 Bytes

Versions: 10

Compression:

Stored size: 392 Bytes

Contents

#:enddoc:
module RailsConnector
  class Attribute
    attr_reader :name, :type

    def initialize(data)
      @name, @type = data['name'], data['type'].to_sym
    end

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

    def self.type_of(name)
      attribute = by_name(name)
      attribute.type if attribute
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
infopark_cloud_connector-6.8.0.beta.200.891.647580e lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.889.d503e42 lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.883.f5f063b lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.884.4bd86e6 lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.869.9609b39 lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.856.8c0fec5 lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.809.bdfa8c3 lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.785.05d4af9 lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.744.99f67fc lib/rails_connector/attribute.rb
infopark_cloud_connector-6.8.0.beta.200.720.44fbabd lib/rails_connector/attribute.rb