Class: Aranha::StartPoint
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Aranha::StartPoint
- Defined in:
- app/models/aranha/start_point.rb
Class Method Summary collapse
- .add_processor_class(klass) ⇒ Object
- .processor_class_list ⇒ Object
- .processor_class_options ⇒ Object
Instance Method Summary collapse
Class Method Details
.add_processor_class(klass) ⇒ Object
6 7 8 |
# File 'app/models/aranha/start_point.rb', line 6 def add_processor_class(klass) processor_class_list_var.add(klass.to_s) end |
.processor_class_list ⇒ Object
10 11 12 |
# File 'app/models/aranha/start_point.rb', line 10 def processor_class_list processor_class_list_var.to_enum end |
.processor_class_options ⇒ Object
14 15 16 |
# File 'app/models/aranha/start_point.rb', line 14 def processor_class_list.map { |e| [e, e] }.to_h # rubocop:disable Style/MapToHash end |
Instance Method Details
#extra_data ⇒ Object
30 31 32 |
# File 'app/models/aranha/start_point.rb', line 30 def extra_data extra_data_yaml.nil? ? nil : ::EacRubyUtils::Yaml.load(extra_data_yaml) end |
#extra_data=(value) ⇒ Object
34 35 36 |
# File 'app/models/aranha/start_point.rb', line 34 def extra_data=(value) self.extra_data_yaml = ::EacRubyUtils::Yaml.dump(value) end |
#processor_class_in_list ⇒ Object
38 39 40 41 42 43 |
# File 'app/models/aranha/start_point.rb', line 38 def processor_class_in_list return if processor_class.blank? return if self.class.processor_class_list.include?(processor_class) errors.add(:processor_class, 'Not in list') end |