Class: AwardTransactionObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, Navigation, StringFactory
Defined in:
lib/kuality-coeus/data_objects/award/award_transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Navigation

#doc_search, #fill_out, #on_document?, #on_page?, #open_document

Methods included from Utilities

#get, #make_role, #make_user, #random_percentage, #set, #snake_case

Constructor Details

#initialize(browser, opts = {}) ⇒ AwardTransactionObject

Returns a new instance of AwardTransactionObject.



11
12
13
14
15
16
17
18
19
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 11

def initialize(browser, opts={})
  @browser = browser

  defaults = {
    comment: random_string
  }
  set_options(defaults.merge(opts))
  requires :award_id
end

Instance Attribute Details

#anticipated_changeObject

Returns the value of attribute anticipated_change.



8
9
10
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 8

def anticipated_change
  @anticipated_change
end

#award_idObject

Returns the value of attribute award_id.



8
9
10
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 8

def award_id
  @award_id
end

#commentObject

Returns the value of attribute comment.



8
9
10
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 8

def comment
  @comment
end

#destination_awardObject

Returns the value of attribute destination_award.



8
9
10
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 8

def destination_award
  @destination_award
end

#obligated_changeObject

Returns the value of attribute obligated_change.



8
9
10
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 8

def obligated_change
  @obligated_change
end

#source_awardObject

Returns the value of attribute source_award.



8
9
10
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 8

def source_award
  @source_award
end

Instance Method Details

#createObject



21
22
23
24
25
26
27
28
29
30
# File 'lib/kuality-coeus/data_objects/award/award_transaction.rb', line 21

def create
  navigate
  on TimeAndMoney do |create|
    create.expand_all
    create.transaction_comment.fit @comment
    fill_out create, :source_award, :destination_award, :obligated_change,
             :anticipated_change
    create.add_transaction
  end
end