Sha256: 462a865072e23ba7a393bbaf13c752bc0989ce1decddb13f3b2a47daa43f478a
Contents?: true
Size: 351 Bytes
Versions: 28
Compression:
Stored size: 351 Bytes
Contents
module Unit class Schema Attribute = Struct.new(:name, :type, :readonly) def initialize @attributes = [] end def contains?(name) attributes.map(&:name).include? name end def add(name, type, readonly: false) @attributes << Attribute.new(name, type, readonly) end attr_reader :attributes end end
Version data entries
28 entries across 28 versions & 1 rubygems