Class: StringyFi::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/stringyfi/shell.rb

Overview

CLI support

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = []) ⇒ Shell

Returns a new instance of Shell.



7
8
9
10
# File 'lib/stringyfi/shell.rb', line 7

def initialize(args = [])
  filename = args.first || File.join(File.dirname(__FILE__), '..', '..', 'spec', 'fixtures', 'music_xml', 'chromatic.xml')
  self.converter = StringyFi::Converter.new(filename)
end

Instance Attribute Details

#converterObject

Returns the value of attribute converter.



5
6
7
# File 'lib/stringyfi/shell.rb', line 5

def converter
  @converter
end

Instance Method Details

#convert!Object



12
13
14
# File 'lib/stringyfi/shell.rb', line 12

def convert!
  converter.convert!
end