Class: Mondavi::IsComponentLocal

Inherits:
Object
  • Object
show all
Includes:
Operation
Defined in:
lib/mondavi/is_component_local.rb

Instance Method Summary collapse

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

#callObject



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