lib/clomp/result.rb in clomp-0.1.0 vs lib/clomp/result.rb in clomp-1.0.0
- old
+ new
@@ -1,15 +1,19 @@
module Clomp
class Result
- attr_reader :options, :operation, :state
+ attr_reader :operation, :state
def initialize(options: {}, tracks: [], operation: nil)
@report = {}
@operation = set_prop :operation, operation || Operation.new
@tracks = set_prop :tracks, tracks || []
- @options = {}
+ @options = Option.new
@immutable_data = set_prop :options, options
- @state = ->(tracks) {tracks.select {|track| track.failure?}.count.zero?}
+ @state = ->(tracks) { tracks.select {|track| track.failure?}.count.zero? }
+ end
+
+ def options=(options = Option.new)
+ @options = options
end
def data
options[:mutable_data]
end
\ No newline at end of file