Class: Bubble

Inherits:
Object
  • Object
show all
Defined in:
lib/bubbler/bubble.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Bubble

Returns a new instance of Bubble.



3
4
5
6
7
# File 'lib/bubbler/bubble.rb', line 3

def initialize args
  @name       = args[:name]
  @path       = args[:path]
  @line_count = args[:line_count]
end

Instance Method Details

#as_d3_hashObject



13
14
15
# File 'lib/bubbler/bubble.rb', line 13

def as_d3_hash
  { name: @name, path: @path, value: @line_count }
end

#to_json(options = {}) ⇒ Object



9
10
11
# File 'lib/bubbler/bubble.rb', line 9

def to_json options={}
  self.as_d3_hash.to_json
end