Module: Delayed::JobGroups::YamlLoader
- Defined in:
- lib/delayed/job_groups/yaml_loader.rb
Class Method Summary collapse
Class Method Details
.dump(object) ⇒ Object
14 15 16 17 18 |
# File 'lib/delayed/job_groups/yaml_loader.rb', line 14 def self.dump(object) return if object.nil? YAML.dump(object) end |
.load(yaml) ⇒ Object
8 9 10 11 12 |
# File 'lib/delayed/job_groups/yaml_loader.rb', line 8 def self.load(yaml) return yaml unless yaml.is_a?(String) && /^---/.match(yaml) YAML.load_dj(yaml) end |