module ROM::Files::Plugins::Schema::Stat::DSL

@api private

Public Instance Methods

stat(name = NAME, stats: EMPTY_ARRAY, aliases: EMPTY_HASH) click to toggle source

@example Sets non-default list of stat properties

schema do
  use :stat
  stat :basename
end

@example Sets list of aliased properties

schema do
  use :stat
  stat aliased: { created_at: :ctime }
end

@api public

# File lib/rom/files/plugins/schema/stat.rb, line 95
def stat(name = NAME, stats: EMPTY_ARRAY, aliases: EMPTY_HASH)
  options = plugin_options(:stat)
  options[:name] = name
  options[:stats] = stats
  options[:aliases] = aliases

  self
end