Class: BackOps::Operation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BackOps::Operation
- Defined in:
- lib/back_ops/operation.rb
Instance Method Summary collapse
-
#first_action ⇒ Object
Instance Methods =====================================================.
- #get(field) ⇒ Object
- #set(field, value) ⇒ Object
Instance Method Details
#first_action ⇒ Object
Instance Methods =====================================================
32 33 34 35 36 37 38 |
# File 'lib/back_ops/operation.rb', line 32 def first_action self.actions. where(back_ops_actions: { branch: 'main' }). order(order: :asc). limit(1). first end |
#get(field) ⇒ Object
40 41 42 |
# File 'lib/back_ops/operation.rb', line 40 def get(field) globals[field.to_s] end |
#set(field, value) ⇒ Object
44 45 46 47 |
# File 'lib/back_ops/operation.rb', line 44 def set(field, value) globals[field.to_s] = value save! end |