Module: Clusta
- Defined in:
- lib/clusta.rb,
lib/clusta/runner.rb,
lib/clusta/schema.rb,
lib/clusta/geometry.rb,
lib/clusta/transforms.rb,
lib/clusta/geometry/edge.rb,
lib/clusta/serialization.rb,
lib/clusta/geometry/degree.rb,
lib/clusta/geometry/vertex.rb,
lib/clusta/transforms/pm3d.rb,
lib/clusta/geometry/element.rb,
lib/clusta/geometry/neighbor.rb,
lib/clusta/serialization/tsv.rb,
lib/clusta/transforms/import.rb,
lib/clusta/serialization/json.rb,
lib/clusta/geometry/degree_pair.rb,
lib/clusta/geometry/neighborhood.rb,
lib/clusta/geometry/assortativity.rb,
lib/clusta/geometry/directed/edge.rb,
lib/clusta/transforms/prune_edges.rb,
lib/clusta/geometry/directed/degree.rb,
lib/clusta/geometry/directed/neighbor.rb,
lib/clusta/transforms/edges_to_degrees.rb,
lib/clusta/geometry/directed/degree_pair.rb,
lib/clusta/geometry/directed/neighborhood.rb,
lib/clusta/transforms/edges_to_neighborhoods.rb,
lib/clusta/transforms/neighborhoods_to_degree_pairs.rb,
lib/clusta/transforms/degree_pairs_to_assortativities.rb
Defined Under Namespace
Modules: Geometry, Schema, Serialization, Transforms
Classes: Runner
Constant Summary
collapse
- Error =
Class.new(StandardError)
- ArgumentError =
Class.new(Error)
- DirectednessMismatchError =
Class.new(Error)
- AmbiguousArgumentsError =
Class.new(Error)
- NotImplementedError =
Class.new(Error)
- SortError =
Class.new(Error)
Class Method Summary
collapse
Class Method Details
.classify(string) ⇒ Object
9
10
11
|
# File 'lib/clusta.rb', line 9
def self.classify string
string.split('_').map(&:capitalize).join
end
|
.require_name(path) ⇒ Object
13
14
15
|
# File 'lib/clusta.rb', line 13
def self.require_name path
File.basename(path).gsub(/\.rb$/, '')
end
|
.require_path(path) ⇒ Object
17
18
19
|
# File 'lib/clusta.rb', line 17
def self.require_path path
File.join(File.dirname(path), File.basename(path).gsub(/\.rb$/, ''))
end
|
.underscore(string) ⇒ Object
5
6
7
|
# File 'lib/clusta.rb', line 5
def self.underscore string
string.gsub(/([A-Z])/, '_\1').downcase[1..-1]
end
|