Module: ActiveMocker::MockCreator::SafeMethods
- Included in:
- DefinedMethods, Scopes
- Defined in:
- lib/active_mocker/mock_creator/safe_methods.rb
Defined Under Namespace
Modules: ActiveMocker
Constant Summary collapse
- BASE =
{ instance_methods: [], scopes: [], methods: [], all_methods_safe: false }.freeze
Instance Method Summary collapse
Instance Method Details
#safe_method?(type, name) ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/active_mocker/mock_creator/safe_methods.rb', line 7 def safe_method?(type, name) plural_type = (type.to_s + "s").to_sym all_methods_safe = all_methods_safe?(type, name) return true if all_methods_safe return true if safe_methods[plural_type].include?(name) false end |