class Moniker::Server

A Moniker Server

Attributes

Public Class Methods

find_by_name(name, options = {}) click to toggle source
# File lib/moniker/server.rb, line 59
def self.find_by_name(name, options = {})
  all(options).detect { |domain| domain.name == name }
end

Protected Instance Methods

initialize(attributes = {}, persisted = false) click to toggle source
Calls superclass method
# File lib/moniker/server.rb, line 38
def initialize(attributes = {}, persisted = false) # :notnew:
  attributes = attributes.with_indifferent_access
  new_attributes = {
      :id => attributes[:id],
      :name => attributes[:name],
      :updated_at => attributes[:created_at].present? ? DateTime.strptime(attributes[:created_at], Moniker::DATETIME_FORMAT) : nil,
      :created_at => attributes[:created_at].present? ? DateTime.strptime(attributes[:created_at], Moniker::DATETIME_FORMAT) : nil
  }

  super(new_attributes, persisted)
end