Class: ODDB::SelectSubstance

Inherits:
Object
  • Object
show all
Defined in:
src/model/selectsubstance.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (SelectSubstance) initialize(user_input, selection, active_agent)

A new instance of SelectSubstance



9
10
11
12
13
# File 'src/model/selectsubstance.rb', line 9

def initialize(user_input, selection, active_agent)
  @user_input = user_input
  @selection = selection
  @active_agent = active_agent
end

Instance Attribute Details

- (Object) active_agent (readonly)

Returns the value of attribute active_agent



8
9
10
# File 'src/model/selectsubstance.rb', line 8

def active_agent
  @active_agent
end

- (Object) selection (readonly)

Returns the value of attribute selection



8
9
10
# File 'src/model/selectsubstance.rb', line 8

def selection
  @selection
end

- (Object) user_input (readonly)

Returns the value of attribute user_input



8
9
10
# File 'src/model/selectsubstance.rb', line 8

def user_input
  @user_input
end

Instance Method Details

- (Object) assigned



20
21
22
# File 'src/model/selectsubstance.rb', line 20

def assigned 
  @active_agent.sequence.substances
end

- (Object) new_substance



23
24
25
26
# File 'src/model/selectsubstance.rb', line 23

def new_substance
  pointer = Persistence::Pointer.new([:substance]) 
  Persistence::CreateItem.new(pointer)
end

- (Object) pointer



14
15
16
# File 'src/model/selectsubstance.rb', line 14

def pointer
  @active_agent.pointer
end

- (Object) structural_ancestors(app)



17
18
19
# File 'src/model/selectsubstance.rb', line 17

def structural_ancestors(app)
  @active_agent.structural_ancestors(app)
end