Module: Sequencescape::Api::Resource::ActiveModel

Included in:
Sequencescape::Api::Resource
Defined in:
lib/sequencescape-api/resource/active_model.rb

Overview

Code that is required to support the ActiveModel basic interface.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(base)



6
7
8
9
10
11
# File 'lib/sequencescape-api/resource/active_model.rb', line 6

def self.included(base)
  base.class_eval do
    include ::ActiveModel::Conversion
    include ::ActiveModel::Dirty
  end
end

Instance Method Details

- (Boolean) persisted?

Returns:

  • (Boolean)


13
14
15
# File 'lib/sequencescape-api/resource/active_model.rb', line 13

def persisted?
  not self.uuid.nil?
end