Class: I18n::Tasks::ConsoleContext

Inherits:
BaseTask
  • Object
show all
Defined in:
lib/i18n/tasks/console_context.rb

Defined Under Namespace

Modules: Messages

Constant Summary

Constants included from Data

Data::DATA_DEFAULTS

Constants included from Configuration

I18n::Tasks::Configuration::CONFIG_FILES, I18n::Tasks::Configuration::DEFAULTS, I18n::Tasks::Configuration::IGNORE_TYPES

Constants included from Logging

Logging::MUTEX, Logging::PROGRAM_NAME

Constants included from MissingKeys

MissingKeys::MISSING_TYPES

Constants included from UsedKeys

UsedKeys::ALWAYS_EXCLUDE, UsedKeys::SEARCH_DEFAULTS

Constants included from HtmlKeys

HtmlKeys::HTML_KEY_PATTERN, HtmlKeys::MAYBE_PLURAL_HTML_KEY_PATTERN

Constants included from PluralKeys

PluralKeys::CLDR_CATEGORY_KEYS, PluralKeys::PLURAL_KEY_RE, PluralKeys::PLURAL_KEY_SUFFIXES

Constants included from KeyPatternMatching

KeyPatternMatching::MATCH_NOTHING

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseTask

#initialize, #inspect

Methods included from Stats

#forest_stats

Methods included from Data

#build_tree, #data, #data_forest, #empty_forest, #external_key?, #key_value?, #node, #non_normalized_paths, #normalize_store!, #t, #t_proc, #tree

Methods included from Configuration

#base_locale, #config, #config=, #config_for_inspect, #config_sections, #data_config, #file_config, #ignore_config, #internal_locale, #locales, #translation_config

Methods included from Logging

log_error, log_stderr, log_verbose, log_warn, program_name, warn_deprecated

Methods included from Translation

#translate_forest

Methods included from UnusedKeys

#unused_keys, #unused_tree

Methods included from Interpolations

#inconsistent_interpolations

Methods included from MissingKeys

#collapse_same_key_in_locales!, #eq_base_keys, #equal_values_tree, #load_rails_i18n_pluralization!, #locale_key_missing?, #missing_diff_forest, #missing_diff_tree, #missing_keys, #missing_keys_types, missing_keys_types, #missing_plural_forest, #missing_used_forest, #missing_used_tree, #required_plural_keys_for_locale

Methods included from IgnoreKeys

#ignore_key?, #ignore_pattern

Methods included from UsedKeys

#caching_file_finder_provider, #caching_file_reader, #merge_scanner_configs, #scanner, #search_config, #used_in_expr?, #used_in_source_tree, #used_tree

Methods included from HtmlKeys

#html_key?

Methods included from References

#process_references

Methods included from PluralKeys

#collapse_plural_nodes!, #depluralize_key, #plural_forms?, #plural_nodes, #plural_suffix?

Methods included from KeyPatternMatching

#compile_key_pattern, #compile_patterns_re, #key_pattern_re_body

Methods included from SplitKey

last_key_part, split_key

Constructor Details

This class inherits a constructor from I18n::Tasks::BaseTask

Class Method Details

.startObject



18
19
20
21
22
23
24
25
26
# File 'lib/i18n/tasks/console_context.rb', line 18

def start
  require 'irb'
  IRB.setup nil
  ctx = IRB::Irb.new.context
  IRB.conf[:MAIN_CONTEXT] = ctx
  $stderr.puts Messages.banner
  require 'irb/ext/multi-irb'
  IRB.irb nil, new
end

Instance Method Details



9
10
11
# File 'lib/i18n/tasks/console_context.rb', line 9

def banner
  puts Messages.banner
end

#guideObject



13
14
15
# File 'lib/i18n/tasks/console_context.rb', line 13

def guide
  puts Messages.guide
end

#to_sObject



5
6
7
# File 'lib/i18n/tasks/console_context.rb', line 5

def to_s
  @to_s ||= "i18n-tasks-#{I18n::Tasks::VERSION}"
end