Class: Defgen::DefaultfileBuilder
- Inherits:
-
Object
- Object
- Defgen::DefaultfileBuilder
- Defined in:
- lib/defgen/defaultfile_builder.rb
Instance Attribute Summary collapse
-
#defaultfile ⇒ Object
Returns the value of attribute defaultfile.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#project_settings ⇒ Object
Returns the value of attribute project_settings.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#defaultfile ⇒ Object
Returns the value of attribute defaultfile.
3 4 5 |
# File 'lib/defgen/defaultfile_builder.rb', line 3 def defaultfile @defaultfile end |
#parser ⇒ Object
Returns the value of attribute parser.
3 4 5 |
# File 'lib/defgen/defaultfile_builder.rb', line 3 def parser @parser end |
#project_settings ⇒ Object
Returns the value of attribute project_settings.
3 4 5 |
# File 'lib/defgen/defaultfile_builder.rb', line 3 def project_settings @project_settings end |
Class Method Details
.build ⇒ Object
5 6 7 |
# File 'lib/defgen/defaultfile_builder.rb', line 5 def self.build new.tap { |instance| yield(instance) }.build end |
Instance Method Details
#build ⇒ Object
9 10 11 12 |
# File 'lib/defgen/defaultfile_builder.rb', line 9 def build properties = parser.parse(defaultfile).each do |property| property.prefix = project_settings.prefix end Defaultfile.new properties, project_settings end |