Module: RbsShrine::Shrine

Defined in:
lib/rbs_shrine/shrine.rb

Defined Under Namespace

Classes: Generator

Class Method Summary collapse

Class Method Details

.allObject

: Array



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

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

.class_to_rbs(klass) ⇒ Object



13
14
15
# File 'lib/rbs_shrine/shrine.rb', line 13

def self.class_to_rbs(klass) #: String
  Generator.new(klass).generate
end