Class: Report
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Report
- Defined in:
- lib/puppet-herald/models/report.rb
Class Method Summary collapse
Class Method Details
.create_from_yaml(yaml) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/puppet-herald/models/report.rb', line 13 def self.create_from_yaml yaml parsed = parse_yaml yaml report = Report.new parse_properties parsed, report parse_logs parsed, report node = parse_node parsed, report report.save node.save return report end |
.get_with_log_entries(id) ⇒ Object
9 10 11 |
# File 'lib/puppet-herald/models/report.rb', line 9 def self.get_with_log_entries id Report.where("id = ?", id).includes(:log_entries).first end |