Sha256: fb2ae94e472516503b905540fc7ff15b5e5b71e9f22263e7ef4d1ac7b1011566

Contents?: true

Size: 338 Bytes

Versions: 14

Compression:

Stored size: 338 Bytes

Contents

class Node
  include DataMapper::Resource

  has n, :checks

  property :fqdn, String, :key => true

  validates_is_unique :fqdn
  validates_format :fqdn, :with => /^[0-9|a-z|A-Z|\-|\.]*$/, 
                          :message => "not a RFC1035-formatted FQDN (see section 2.3.1)"

  def hostname
    self.fqdn.split('.').first
  end

end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
auxesis-flapjack-0.4.1 lib/flapjack/models/node.rb
auxesis-flapjack-0.4.10 lib/flapjack/models/node.rb
auxesis-flapjack-0.4.2 lib/flapjack/models/node.rb
auxesis-flapjack-0.4.5 lib/flapjack/models/node.rb
auxesis-flapjack-0.4.6 lib/flapjack/models/node.rb
auxesis-flapjack-0.4.8 lib/flapjack/models/node.rb
auxesis-flapjack-0.4.9 lib/flapjack/models/node.rb
flapjack-0.5.5 lib/flapjack/persistence/data_mapper/models/node.rb
flapjack-0.5.4 lib/flapjack/persistence/data_mapper/models/node.rb
flapjack-0.5.3 lib/flapjack/persistence/data_mapper/models/node.rb
flapjack-0.5.1 lib/flapjack/persistence/data_mapper/models/node.rb
flapjack-0.4.12 lib/flapjack/models/node.rb
flapjack-0.4.11 lib/flapjack/models/node.rb
flapjack-0.4.10 lib/flapjack/models/node.rb