Module: Bparity
- Defined in:
- lib/bparity.rb,
lib/bparity/cli.rb,
lib/bparity/corpus.rb,
lib/bparity/errors.rb,
lib/bparity/adapter.rb,
lib/bparity/version.rb,
lib/bparity/adequacy.rb,
lib/bparity/boundary.rb,
lib/bparity/recording.rb,
lib/bparity/reporting.rb,
lib/bparity/synthesis.rb,
lib/bparity/formal/lts.rb,
lib/bparity/spec_bundle.rb,
lib/bparity/verification.rb,
lib/bparity/formal/result.rb,
lib/bparity/formal/bounded.rb,
lib/bparity/formal/contract.rb,
lib/bparity/formal/deductive.rb,
lib/bparity/formal/assumptions.rb,
lib/bparity/cli/formal_commands.rb,
lib/bparity/cli/verification_commands.rb
Defined Under Namespace
Modules: Adapter, Adequacy, Boundary, Corpus, Formal, FormalCommands, Recording, Reporting, SpecBundle, Synthesis, Verification, VerificationCommands Classes: CLI, ConfigurationError, Error, InvalidBundleError, VerificationError
Constant Summary collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.adapter_definition ⇒ Object
readonly
Returns the value of attribute adapter_definition.
-
.boundary_definition ⇒ Object
readonly
Returns the value of attribute boundary_definition.
Class Method Summary collapse
-
.adapter(spec: nil, &block) ⇒ Object
Maps a specification bundle onto a replacement API.
-
.boundary(&block) ⇒ Object
Defines the observable legacy API.
- .constantize(name) ⇒ Object
- .exception_message(error) ⇒ Object
- .reset! ⇒ Object
Class Attribute Details
.adapter_definition ⇒ Object (readonly)
Returns the value of attribute adapter_definition.
18 19 20 |
# File 'lib/bparity.rb', line 18 def adapter_definition @adapter_definition end |
.boundary_definition ⇒ Object (readonly)
Returns the value of attribute boundary_definition.
18 19 20 |
# File 'lib/bparity.rb', line 18 def boundary_definition @boundary_definition end |
Class Method Details
.adapter(spec: nil, &block) ⇒ Object
Maps a specification bundle onto a replacement API.
26 27 28 |
# File 'lib/bparity.rb', line 26 def adapter(spec: nil, &block) @adapter_definition = Adapter::Definition.new(spec: spec).tap { |definition| definition.instance_eval(&block) } end |
.boundary(&block) ⇒ Object
Defines the observable legacy API.
21 22 23 |
# File 'lib/bparity.rb', line 21 def boundary(&block) @boundary_definition = Boundary::Definition.new.tap { |definition| definition.instance_eval(&block) } end |
.constantize(name) ⇒ Object
34 35 36 37 38 |
# File 'lib/bparity.rb', line 34 def constantize(name) name.split("::").reject(&:empty?).inject(Object) { |scope, part| scope.const_get(part, false) } rescue NameError raise ConfigurationError, "Cannot find #{name}. Require the target implementation first." end |
.exception_message(error) ⇒ Object
4 5 6 |
# File 'lib/bparity/errors.rb', line 4 def self.(error) error.respond_to?(:original_message) ? error. : error. end |
.reset! ⇒ Object
30 31 32 |
# File 'lib/bparity.rb', line 30 def reset! @boundary_definition = @adapter_definition = nil end |