Sha256: 93f426284796e1de837fa24b94a14136012cfed4cd384e08f9b27683c27271d3
Contents?: true
Size: 420 Bytes
Versions: 17
Compression:
Stored size: 420 Bytes
Contents
#!/usr/bin/env ruby class CheckTemplate include DataMapper::Resource has n, :checks property :id, Serial property :command, Text, :nullable => false property :name, String, :nullable => false property :params, Yaml validates_is_unique :command, :name def name_for_select cmd = (self.command.size > 30 ? "#{self.command[0..50]}..." : self.command) "#{self.name} (#{cmd})" end end
Version data entries
17 entries across 17 versions & 1 rubygems