Class: EacLauncher::Publish::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_launcher/publish/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance) ⇒ Base

Returns a new instance of Base.



10
11
12
# File 'lib/eac_launcher/publish/base.rb', line 10

def initialize(instance)
  @instance = instance
end

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance.



8
9
10
# File 'lib/eac_launcher/publish/base.rb', line 8

def instance
  @instance
end

Instance Method Details

#checkObject



22
23
24
25
26
27
28
# File 'lib/eac_launcher/publish/base.rb', line 22

def check
  s = check_with_rescue
  ::EacLauncher::Context.current.instance_manager.publish_state_set(
    instance, stereotype.stereotype_name, s.status
  )
  s
end

#runObject



14
15
16
17
18
19
20
# File 'lib/eac_launcher/publish/base.rb', line 14

def run
  s = check
  info("Check: #{s}")
  return unless s.status == ::EacLauncher::Publish::CheckResult::STATUS_PENDING

  publish
end