Module: Dotsync::Icons
- Defined in:
- lib/dotsync/icons.rb
Constant Summary collapse
- INFO =
Log level icons
" "- ERROR =
" "- OPTIONS =
Configuration icon
" "- ENV_VARS =
" "- LEGEND =
" "- CONFIG =
" "- DIFF =
" "- DEFAULT_FORCE =
Default Mappings Legend icons
" "- DEFAULT_ONLY =
" "- DEFAULT_IGNORE =
" "- DEFAULT_INVALID =
" "- DEFAULT_DIFF_CREATED =
Default Mappings Differences icons
" "- DEFAULT_DIFF_UPDATED =
" "- DEFAULT_DIFF_REMOVED =
" "- PULL =
Action icons
" "- PUSH =
" "- WATCH =
" "- CONSOLE =
" "- LISTEN =
TODO: review icons needed
" "- SOURCE =
“
" "- DEST =
“ ”
" "- BELL =
" "- COPY =
" "- SKIP =
" "- DONE =
" "- BACKUP =
" "- MAPPINGS =
{ info: INFO, error: ERROR, env_vars: ENV_VARS, options: OPTIONS, legend: LEGEND, config: CONFIG, diff: DIFF, force: -> { force }, ignore: -> { ignore }, pull: PULL, push: PUSH, watch: WATCH, console: CONSOLE, listen: LISTEN, source: SOURCE, dest: DEST, bell: BELL, copy: COPY, skip: SKIP, done: DONE, backup: BACKUP }
Class Method Summary collapse
-
.diff_created ⇒ Object
Differences Legend methods.
- .diff_removed ⇒ Object
- .diff_updated ⇒ Object
-
.force ⇒ Object
Mappings Legend methods.
- .ignore ⇒ Object
- .invalid ⇒ Object
- .load_custom_icons(config) ⇒ Object
- .only ⇒ Object
Class Method Details
.diff_created ⇒ Object
Differences Legend methods
80 81 82 |
# File 'lib/dotsync/icons.rb', line 80 def self.diff_created @custom_icons[:diff_created] || DEFAULT_DIFF_CREATED end |
.diff_removed ⇒ Object
88 89 90 |
# File 'lib/dotsync/icons.rb', line 88 def self.diff_removed @custom_icons[:diff_removed] || DEFAULT_DIFF_REMOVED end |
.diff_updated ⇒ Object
84 85 86 |
# File 'lib/dotsync/icons.rb', line 84 def self.diff_updated @custom_icons[:diff_updated] || DEFAULT_DIFF_UPDATED end |
.force ⇒ Object
Mappings Legend methods
62 63 64 |
# File 'lib/dotsync/icons.rb', line 62 def self.force @custom_icons[:force] || DEFAULT_FORCE end |
.ignore ⇒ Object
70 71 72 |
# File 'lib/dotsync/icons.rb', line 70 def self.ignore @custom_icons[:ignore] || DEFAULT_IGNORE end |
.invalid ⇒ Object
74 75 76 |
# File 'lib/dotsync/icons.rb', line 74 def self.invalid @custom_icons[:invalid] || DEFAULT_INVALID end |
.load_custom_icons(config) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/dotsync/icons.rb', line 45 def self.load_custom_icons(config) config ||= {} @custom_icons = { # Mappings Legend force: config.dig("icons", "force") || DEFAULT_FORCE, only: config.dig("icons", "only") || DEFAULT_ONLY, ignore: config.dig("icons", "ignore") || DEFAULT_IGNORE, invalid: config.dig("icons", "invalid") || DEFAULT_INVALID, # Differences Legend diff_created: config.dig("icons", "diff_created") || DEFAULT_DIFF_CREATED, diff_updated: config.dig("icons", "diff_updated") || DEFAULT_DIFF_UPDATED, diff_removed: config.dig("icons", "diff_removed") || DEFAULT_DIFF_REMOVED, } end |
.only ⇒ Object
66 67 68 |
# File 'lib/dotsync/icons.rb', line 66 def self.only @custom_icons[:only] || DEFAULT_ONLY end |