Class: Symbol
Instance Method Summary collapse
-
#to_hg_int ⇒ Object
Converts the symbol to an integer used for tracking the state of files in the dir_state.
-
#to_hg_letter ⇒ Object
Converts the symbol to the letter it corresponds to.
- #to_proc ⇒ Object
Instance Method Details
#to_hg_int ⇒ Object
Converts the symbol to an integer used for tracking the state of files in the dir_state.
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/amp/support/support.rb', line 885 def to_hg_int case self when :normal, :dirty 110 # "n".ord when :untracked 63 # "?".ord when :added 97 # "a".ord when :removed 114 # "r".ord when :merged 109 # "m".ord else raise "No known hg value for #{self}" end end |
#to_hg_letter ⇒ Object
Converts the symbol to the letter it corresponds to
903 904 905 |
# File 'lib/amp/support/support.rb', line 903 def to_hg_letter to_hg_int.chr end |
#to_proc ⇒ Object
907 908 909 910 911 |
# File 'lib/amp/support/support.rb', line 907 def to_proc proc do |arg| arg.send self end end |