lib/data_miner/process.rb in data_miner-1.2.0 vs lib/data_miner/process.rb in data_miner-1.2.1
- old
+ new
@@ -1,29 +1,30 @@
class DataMiner
class Process
attr_reader :config
attr_reader :method_id
- attr_reader :block_description
+ attr_reader :description
attr_reader :blk
- alias :description :block_description
+ alias :block_description :description
- def initialize(config, method_id_or_block_description, &blk)
+ def initialize(config, method_id_or_description, &blk)
@config = config
if block_given?
- @block_description = method_id_or_block_description
+ @description = method_id_or_description
@blk = blk
else
- @method_id = method_id_or_block_description
+ @description = method_id_or_description
+ @method_id = method_id_or_description
end
end
def resource
config.resource
end
def inspect
- %{#<DataMiner::Process(#{resource}) #{block_description || method_id}>}
+ %{#<DataMiner::Process(#{resource}) #{description}>}
end
def run
if blk
blk.call