Module: ROM::Files::Types
- Includes:
- Types
- Defined in:
- lib/rom/files/types.rb,
lib/rom/files/extensions/ruby/types.rb,
lib/rom/files/extensions/markdown/types.rb
Defined Under Namespace
Constant Summary collapse
- Path =
Types::Pathname.(primary_key: true)
- FileStat =
Dry::Types::Definition[File::Stat].new(File::Stat)
- FileType =
Coercible::String.enum('file', 'directory', 'characterSpecial', 'blockSpecial', 'fifo', 'link', 'socket', 'unknown')
- MimeType =
Dry::Types::Definition[MIME::Type].new(MIME::Type).optional.constructor do |type| MIME::Types[type].first end
Class Method Summary collapse
-
.ForeignKey(relation, type = Types::Pathname, map: ->(pathname) { pathname }) ⇒ Dry::Types::Definition
Define a foreign key attribute type.
Class Method Details
.ForeignKey(relation, type = Types::Pathname, map: ->(pathname) { pathname }) ⇒ Dry::Types::Definition
Define a foreign key attribute type
32 33 34 |
# File 'lib/rom/files/types.rb', line 32 def self.ForeignKey(relation, type = Types::Pathname, map: ->(pathname) { pathname }) super(relation, type.(__proc__: map)) end |