Class: Structure

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
CoreBase
Defined in:
app/models/structure.rb

Overview

Attributes:

Associations:

Instance Method Summary (collapse)

Instance Method Details

- (StructureCenter) center_by_reference_space(reference_space_id)

Returns the structure center

Parameters:

  • reference_space_id (Integer)

    a reference space id

Returns:



64
65
66
67
# File 'app/models/structure.rb', line 64

def center_by_reference_space(reference_space_id)
  centers = self.structure_centers.by_reference_space(reference_space_id)
  centers.size > 0 ? centers[0] : nil
end