Class: Mondavi::IsComponentLocal
- Inherits:
-
Object
- Object
- Mondavi::IsComponentLocal
- Includes:
- Operation
- Defined in:
- lib/mondavi/is_component_local.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(target_concept:) ⇒ IsComponentLocal
constructor
A new instance of IsComponentLocal.
Constructor Details
#initialize(target_concept:) ⇒ IsComponentLocal
Returns a new instance of IsComponentLocal.
5 6 7 |
# File 'lib/mondavi/is_component_local.rb', line 5 def initialize(target_concept:) @target_concept = target_concept end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 |
# File 'lib/mondavi/is_component_local.rb', line 9 def call() impl = @target_concept.to_s.gsub("Component", "ComponentImpl") Object.const_get(impl).present? rescue NameError => e false end |