Class: C11n::Importer::Ios
- Inherits:
-
Object
- Object
- C11n::Importer::Ios
- Defined in:
- lib/c11n/importer/ios.rb
Instance Attribute Summary collapse
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
- #file ⇒ Object
- #import ⇒ Object
-
#initialize(options = {}) ⇒ Ios
constructor
A new instance of Ios.
Constructor Details
#initialize(options = {}) ⇒ Ios
Returns a new instance of Ios.
6 7 8 9 10 11 |
# File 'lib/c11n/importer/ios.rb', line 6 def initialize( = {}) @path = [:path] @locale = [:locale] @types = {} @categories = {} end |
Instance Attribute Details
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
4 5 6 |
# File 'lib/c11n/importer/ios.rb', line 4 def categories @categories end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
4 5 6 |
# File 'lib/c11n/importer/ios.rb', line 4 def types @types end |
Instance Method Details
#file ⇒ Object
23 24 25 |
# File 'lib/c11n/importer/ios.rb', line 23 def file File.open(@path, 'r') end |
#import ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/c11n/importer/ios.rb', line 13 def import result = {} file.each_line do |line| result.merge parse(line) end result end |