Class: Igniter::Lang::Backends::Ruby
- Inherits:
-
Object
- Object
- Igniter::Lang::Backends::Ruby
- Includes:
- Igniter::Lang::Backend
- Defined in:
- lib/igniter/lang/backends/ruby.rb
Instance Attribute Summary collapse
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
Instance Method Summary collapse
- #compilation_report(profile: self.profile, &block) ⇒ Object
- #compile(profile: self.profile, &block) ⇒ Object
- #diagnose(result, profile: self.profile) ⇒ Object
- #execute(artifact, inputs:, profile: self.profile) ⇒ Object
-
#initialize(profile: Igniter::Contracts.default_profile) ⇒ Ruby
constructor
A new instance of Ruby.
- #verify(artifact = nil, profile: self.profile, &block) ⇒ Object
Constructor Details
#initialize(profile: Igniter::Contracts.default_profile) ⇒ Ruby
Returns a new instance of Ruby.
11 12 13 |
# File 'lib/igniter/lang/backends/ruby.rb', line 11 def initialize(profile: Igniter::Contracts.default_profile) @profile = profile end |
Instance Attribute Details
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
9 10 11 |
# File 'lib/igniter/lang/backends/ruby.rb', line 9 def profile @profile end |
Instance Method Details
#compilation_report(profile: self.profile, &block) ⇒ Object
19 20 21 |
# File 'lib/igniter/lang/backends/ruby.rb', line 19 def compilation_report(profile: self.profile, &block) Igniter::Contracts.compilation_report(profile: profile, &block) end |
#compile(profile: self.profile, &block) ⇒ Object
15 16 17 |
# File 'lib/igniter/lang/backends/ruby.rb', line 15 def compile(profile: self.profile, &block) Igniter::Contracts.compile(profile: profile, &block) end |
#diagnose(result, profile: self.profile) ⇒ Object
27 28 29 |
# File 'lib/igniter/lang/backends/ruby.rb', line 27 def diagnose(result, profile: self.profile) Igniter::Contracts.diagnose(result, profile: profile) end |
#execute(artifact, inputs:, profile: self.profile) ⇒ Object
23 24 25 |
# File 'lib/igniter/lang/backends/ruby.rb', line 23 def execute(artifact, inputs:, profile: self.profile) Igniter::Contracts.execute(artifact, inputs: inputs, profile: profile) end |
#verify(artifact = nil, profile: self.profile, &block) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/igniter/lang/backends/ruby.rb', line 31 def verify(artifact = nil, profile: self.profile, &block) if block report = compilation_report(profile: profile, &block) return VerificationReport.from_compilation_report(report) end VerificationReport.from_artifact(artifact, profile_fingerprint: profile.fingerprint) end |