Class: Pixab::LocalizationPlatform

Inherits:
Object
  • Object
show all
Defined in:
lib/LocalizationPlatform.rb

Direct Known Subclasses

LocalizationAndroid, LocalizationiOS

Instance Method Summary collapse

Instance Method Details

#dir_name(locale) ⇒ Object



28
29
30
# File 'lib/LocalizationPlatform.rb', line 28

def dir_name(locale)
  return ''
end

#file_modeObject



32
33
34
35
36
37
38
39
# File 'lib/LocalizationPlatform.rb', line 32

def file_mode
  case @mode
  when 'add'
    return 'a+'
  else 
    return 'w+'
  end
end

#resolve_commands(commands) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/LocalizationPlatform.rb', line 15

def resolve_commands(commands)
  if commands.nil?
    return
  end
  commands.each_index do |index|
    command = commands[index]
    case command
    when "--mode"
      @mode = commands[index + 1]
    end
  end
end

#run(localized_info_category, commands) ⇒ Object



11
12
13
# File 'lib/LocalizationPlatform.rb', line 11

def run(localized_info_category, commands)
  resolve_commands(commands)
end