Class: Sox::Command::File
- Inherits:
-
Object
- Object
- Sox::Command::File
- Defined in:
- lib/sox/command.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #command_arguments ⇒ Object
-
#initialize(filename, options = {}) ⇒ File
constructor
A new instance of File.
- #sorted_options ⇒ Object
Constructor Details
#initialize(filename, options = {}) ⇒ File
Returns a new instance of File.
150 151 152 153 |
# File 'lib/sox/command.rb', line 150 def initialize(filename, = {}) @filename = filename @options = end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
148 149 150 |
# File 'lib/sox/command.rb', line 148 def filename @filename end |
#options ⇒ Object
Returns the value of attribute options.
148 149 150 |
# File 'lib/sox/command.rb', line 148 def @options end |
Instance Method Details
#==(other) ⇒ Object
168 169 170 171 172 |
# File 'lib/sox/command.rb', line 168 def ==(other) other and other.filename == filename and other. == end |
#command_arguments ⇒ Object
155 156 157 158 159 160 161 162 |
# File 'lib/sox/command.rb', line 155 def command_arguments unless .empty? = .collect do |name, value| "--#{name} #{value}" end.join(' ') + " " end "#{}#{filename}" end |
#sorted_options ⇒ Object
164 165 166 |
# File 'lib/sox/command.rb', line 164 def .to_a.sort_by { |pair| pair.first.to_s } end |