Class: Bri::Mall
Instance Attribute Summary collapse
-
#stores ⇒ Object
readonly
Returns the value of attribute stores.
Instance Method Summary collapse
Instance Attribute Details
#stores ⇒ Object (readonly)
Returns the value of attribute stores.
9 10 11 |
# File 'lib/bri/mall.rb', line 9 def stores @stores end |
Instance Method Details
#class_methods ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/bri/mall.rb', line 15 def class_methods stores.each_with_object( [] ) do |store, result| store.class_methods.each do |klass, methods| methods.each { |method| result << "#{klass}.#{method}" } end end.uniq end |
#classes ⇒ Object
11 12 13 |
# File 'lib/bri/mall.rb', line 11 def classes stores.flat_map(&:module_names).uniq.sort end |
#instance_methods ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/bri/mall.rb', line 23 def instance_methods stores.each_with_object( [] ) do |store, result| store.instance_methods.each do |klass, methods| methods.each { |method| result << "#{klass}##{method}" } end end.uniq end |