Class: Buildr::IntellijIdea::IdeaFile
- Inherits:
-
Object
- Object
- Buildr::IntellijIdea::IdeaFile
- Defined in:
- lib/buildr/intellij_idea/idea_file.rb
Overview
Abstract base class for IdeaModule and IdeaProject
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_SUFFIX =
""
Instance Attribute Summary collapse
-
#buildr_project ⇒ Object
readonly
Returns the value of attribute buildr_project.
- #id ⇒ Object
- #suffix ⇒ Object
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
Instance Attribute Details
#buildr_project ⇒ Object (readonly)
Returns the value of attribute buildr_project.
7 8 9 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 7 def buildr_project @buildr_project end |
#id ⇒ Object
20 21 22 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 20 def id @id ||= buildr_project.name.split(':').last end |
#suffix ⇒ Object
12 13 14 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 12 def suffix @suffix ||= DEFAULT_SUFFIX end |
#template ⇒ Object
Returns the value of attribute template.
10 11 12 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 10 def template @template end |
Instance Method Details
#add_component(name, attrs = {}, &xml) ⇒ Object
24 25 26 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 24 def add_component(name, attrs = {}, &xml) self.components << create_component(name, attrs, &xml) end |
#filename ⇒ Object
16 17 18 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 16 def filename buildr_project.path_to("#{name}.#{extension}") end |
#write(f) ⇒ Object
28 29 30 |
# File 'lib/buildr/intellij_idea/idea_file.rb', line 28 def write(f) document.write f end |