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.
934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 |
# File 'lib/amp/support/support.rb', line 934 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
952 953 954 |
# File 'lib/amp/support/support.rb', line 952 def to_hg_letter to_hg_int.chr end |
#to_proc ⇒ Object
956 957 958 959 960 |
# File 'lib/amp/support/support.rb', line 956 def to_proc proc do |arg| arg.send self end end |