lib/rash/aliasing.rb
# Unless given a compelling reason, this doesn't need to be public. For most 
# purposes, some combination of `alias?` and `aliases` should be sufficient.
Unless given a compelling reason, this doesn't need to be public. For most
purposes, some combination of `alias?` and `aliases` should be sufficient.
Unless given a compelling reason this doesn ' t need to be public . For most purposes some combination of ` alias? ` and ` aliases ` should be sufficient .
def resolve_alias(f)
    result = [f.to_s]
    aliases = @aliases.dup
    found_alias = true
    while found_alias
      found_alias = false
      if aliases.has_key?(result[0].to_sym)
        found_alias = true
        match = result[0].to_sym
        result[0] = aliases[match]
        aliases.delete(match)
        result.flatten! 
      end
    end
    result
  end
def resolve_alias ( f ) result = [ f . to_s ] aliases = @aliases . dup found_alias = true while found_alias found_alias = false if aliases . has_key? ( result [ 0 ] . to_sym ) found_alias = true match = result [ 0 ] . to_sym result [ 0 ] = aliases [ match ] aliases . delete ( match ) result . flatten! end end result end
Unless given a compelling reason, this doesn't need to be public.
Unless given a compelling reason this doesn ' t need to be public .
f