Module: Aka::Configuration::Shortcut
- Defined in:
- lib/aka/configuration.rb
Class Method Summary collapse
Class Method Details
.generate_output(row) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/aka/configuration.rb', line 18 def self.generate_output(row) string = if row.function <<-EOS.gsub(/^ /, '') function #{row.shortcut} { #{row.command} } EOS else %{alias #{row.shortcut}="#{row.command.gsub(%{"}, %{\\"})}"} end string end |
.parse(options) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/aka/configuration.rb', line 8 def self.parse() OpenStruct.new.tap do |row| row.shortcut = ['shortcut'] row.command = ['command'] row.tag = ['tag'] if ['tag'] row.description = ['description'] if ['description'] row.function = ['function'] if ['function'] end end |