Module: RbsShrine::Shrine

Defined in:
lib/rbs_shrine/shrine.rb

Defined Under Namespace

Classes: Generator

Class Method Summary collapse

Class Method Details

.allObject



7
8
9
# File 'lib/rbs_shrine/shrine.rb', line 7

def self.all
  ActiveRecord::Base.descendants.select { |model| model.ancestors.any?(::Shrine::Attachment) }
end

.class_to_rbs(klass) ⇒ Object



11
12
13
# File 'lib/rbs_shrine/shrine.rb', line 11

def self.class_to_rbs(klass)
  Generator.new(klass).generate
end