Navigation Menu

Skip to content

Commit

Permalink
Use meaningful name
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 15, 2015
1 parent 7137264 commit 97c346a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/droonga/single_step_definition.rb
Expand Up @@ -18,7 +18,7 @@ class SingleStepDefinition
attr_accessor :name
attr_accessor :handler
attr_accessor :collector
attr_writer :write, :random
attr_writer :write
attr_writer :timeout_seconds_calculator
attr_accessor :inputs
attr_accessor :output
Expand All @@ -28,7 +28,7 @@ def initialize(plugin_module)
@handler = nil
@collector = nil
@write = false
@random = false
@user_defined_random = nil
@timeout_seconds_calculator = lambda do |step|
if step["timeout"]
return step["timeout"]
Expand All @@ -47,11 +47,15 @@ def write?
@write
end

def random=(value)
@user_defined_random = value
end

def random?
unless @random.nil?
@random
else
if @user_defined_random.nil?
not write?
else
@user_defined_random
end
end

Expand Down

0 comments on commit 97c346a

Please sign in to comment.