Class: Tolk::Export
- Inherits:
-
Object
- Object
- Tolk::Export
- Defined in:
- lib/tolk/export.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(args) ⇒ Export
constructor
A new instance of Export.
Constructor Details
#initialize(args) ⇒ Export
Returns a new instance of Export.
5 6 7 8 9 |
# File 'lib/tolk/export.rb', line 5 def initialize(args) @name = args.fetch(:name, '') @data = args.fetch(:data, {}) @destination = args.fetch(:destination, self.class.dump_path) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/tolk/export.rb', line 3 def data @data end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
3 4 5 |
# File 'lib/tolk/export.rb', line 3 def destination @destination end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/tolk/export.rb', line 3 def name @name end |
Class Method Details
.dump(args) ⇒ Object
18 19 20 |
# File 'lib/tolk/export.rb', line 18 def dump(args) new(args).dump end |
.dump_path ⇒ Object
22 23 24 |
# File 'lib/tolk/export.rb', line 22 def dump_path Tolk::Locale._dump_path end |