Module: RbsDraper::Decoratable

Defined in:
lib/rbs_draper/decoratable.rb

Defined Under Namespace

Classes: Generator

Class Method Summary collapse

Class Method Details

.allObject



7
8
9
10
11
12
13
# File 'lib/rbs_draper/decoratable.rb', line 7

def self.all
  ObjectSpace.each_object.select do |obj|
    obj.is_a?(Class) && obj.ancestors.include?(::Draper::Decoratable) && obj.decorator_class
  rescue StandardError
    nil
  end
end

.class_to_rbs(klass) ⇒ Object



15
16
17
# File 'lib/rbs_draper/decoratable.rb', line 15

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