Class: ODDB::State::Admin::OrphanedPatinfoAssign::OrphanedPatinfoFacade

Inherits:
Object
  • Object
show all
Defined in:
src/state/admin/orphaned_patinfo_assign.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (OrphanedPatinfoFacade) initialize(languages)

A new instance of OrphanedPatinfoFacade



14
15
16
17
18
19
20
21
22
23
24
# File 'src/state/admin/orphaned_patinfo_assign.rb', line 14

def initialize(languages)
  @languages = languages
  if @languages.respond_to?(:pointer)
    @parent_pointer = @languages.pointer 
  end
  @name = begin
    languages.sort.first.last.name
  rescue StandardError => e
    e.message
  end
end

Instance Attribute Details

- (Object) languages (readonly)

Returns the value of attribute languages



13
14
15
# File 'src/state/admin/orphaned_patinfo_assign.rb', line 13

def languages
  @languages
end

- (Object) name (readonly)

Returns the value of attribute name



13
14
15
# File 'src/state/admin/orphaned_patinfo_assign.rb', line 13

def name
  @name
end

- (Object) sequences

Returns the value of attribute sequences



12
13
14
# File 'src/state/admin/orphaned_patinfo_assign.rb', line 12

def sequences
  @sequences
end

Instance Method Details

- (Object) structural_ancestors(app)



25
26
27
28
29
30
31
# File 'src/state/admin/orphaned_patinfo_assign.rb', line 25

def structural_ancestors(app)
  if(@parent_pointer)
    [@parent_pointer.resolve(app)]
  else
    []
  end
end