Class: Buildr::IntellijIdea::IdeaFile
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.
28 29 30 |
# File 'lib/buildr/ide/idea.rb', line 28 def buildr_project @buildr_project end |
#id ⇒ Object
41 42 43 |
# File 'lib/buildr/ide/idea.rb', line 41 def id @id ||= buildr_project.name.split(':').last end |
#suffix ⇒ Object
33 34 35 |
# File 'lib/buildr/ide/idea.rb', line 33 def suffix @suffix ||= DEFAULT_SUFFIX end |
#template ⇒ Object
Returns the value of attribute template.
31 32 33 |
# File 'lib/buildr/ide/idea.rb', line 31 def template @template end |
Instance Method Details
#add_component(name, attrs = {}, &xml) ⇒ Object
45 46 47 |
# File 'lib/buildr/ide/idea.rb', line 45 def add_component(name, attrs = {}, &xml) self.components << create_component(name, attrs, &xml) end |
#filename ⇒ Object
37 38 39 |
# File 'lib/buildr/ide/idea.rb', line 37 def filename buildr_project.path_to("#{name}.#{extension}") end |