Sha256: e02537e28b4bcadb0b9cc29ff297c2e90c4cbd3fa75884e5c238bfa865437e25
Contents?: true
Size: 496 Bytes
Versions: 8
Compression:
Stored size: 496 Bytes
Contents
#:enddoc: module RailsConnector class ObjClass attr_reader :name, :attributes def initialize(data) @name, @attributes = data['name'], data['attributes'] || [] end def self.by_name(name) if data = Revision.current.obj_classes[name.to_s] new(data) else raise ResourceNotFound, "Could not find #{self} with name #{name}" end end def has_attribute?(attribute_name) @attributes.include?(attribute_name.to_s) end end end
Version data entries
8 entries across 8 versions & 1 rubygems