Class: PolyglotIos::Serializer::Language::Base
- Inherits:
-
Object
- Object
- PolyglotIos::Serializer::Language::Base
- Includes:
- ERB::Util
- Defined in:
- lib/ios_polyglot_cli/serializers/languages/languages_serializer.rb
Instance Attribute Summary collapse
-
#languages ⇒ Object
Returns the value of attribute languages.
Instance Method Summary collapse
-
#initialize(languages) ⇒ Base
constructor
A new instance of Base.
- #render ⇒ Object
- #save(path) ⇒ Object
- #template ⇒ Object
Constructor Details
#initialize(languages) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/ios_polyglot_cli/serializers/languages/languages_serializer.rb', line 8 def initialize(languages) @languages = languages end |
Instance Attribute Details
#languages ⇒ Object
Returns the value of attribute languages.
6 7 8 |
# File 'lib/ios_polyglot_cli/serializers/languages/languages_serializer.rb', line 6 def languages @languages end |
Instance Method Details
#render ⇒ Object
12 13 14 |
# File 'lib/ios_polyglot_cli/serializers/languages/languages_serializer.rb', line 12 def render() ERB.new(template, trim_mode: '-').result(binding) end |
#save(path) ⇒ Object
20 21 22 |
# File 'lib/ios_polyglot_cli/serializers/languages/languages_serializer.rb', line 20 def save(path) fail NotImplementedError, 'Abstract Method' end |
#template ⇒ Object
16 17 18 |
# File 'lib/ios_polyglot_cli/serializers/languages/languages_serializer.rb', line 16 def template() fail NotImplementedError, 'Abstract Method' end |