Module: Derketo::Helpers

Included in:
Event, Serializers::Mermaid
Defined in:
lib/derketo/helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.write(filename, text) ⇒ Object



7
8
9
10
11
# File 'lib/derketo/helpers.rb', line 7

def self.write(filename, text)
  File.open(filename, 'w') do |file|
    file << text
  end
end

Instance Method Details

#clean(string) ⇒ Object



3
4
5
# File 'lib/derketo/helpers.rb', line 3

def clean(string)
  string.gsub('::', '/').tr(',', '|').tr(':', '=').delete('#').delete('<').delete('>')
end