Skip to content

Commit

Permalink
Remove needless suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Dec 11, 2014
1 parent ba95e79 commit b6e54a5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/droonga/catalog/dataset.rb
Expand Up @@ -23,44 +23,44 @@ class Dataset

attr_reader :name

def initialize(name, raw_dataset)
def initialize(name, raw)
@name = name
@raw_dataset = raw_dataset
@raw = raw
@schema = nil
end

# provided for compatibility
def [](key)
@raw_dataset[key]
@raw[key]
end

# provided for compatibility
def []=(key, value)
@raw_dataset[key] = value
@raw[key] = value
end

def schema
@schema ||= Schema.new(@name, @raw_dataset["schema"])
@schema ||= Schema.new(@name, @raw["schema"])
end

def plugins
@raw_dataset["plugins"] || []
@raw["plugins"] || []
end

def fact
@raw_dataset["fact"]
@raw["fact"]
end

def n_workers
@raw_dataset["nWorkers"] || 0
@raw["nWorkers"] || 0
end

#XXX Currently, dataset has a property named "replicas" so
# can be parsed as a ReplicasVolume.
# We must introduce a new property "volume" to provide
# ReplicasVolume safely.
def replicas
@replicas ||= ReplicasVolume.new(self, @raw_dataset)
@replicas ||= ReplicasVolume.new(self, @raw)
end

def all_nodes
Expand Down

0 comments on commit b6e54a5

Please sign in to comment.