Class: Ambient::Init
- Inherits:
-
Object
- Object
- Ambient::Init
- Defined in:
- lib/ambient/init.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
-
#project_prefix ⇒ Object
readonly
Returns the value of attribute project_prefix.
Instance Method Summary collapse
- #create_ambientfile ⇒ Object
-
#initialize(path = nil, project_name = nil, project_prefix = nil) ⇒ Init
constructor
A new instance of Init.
Constructor Details
#initialize(path = nil, project_name = nil, project_prefix = nil) ⇒ Init
Returns a new instance of Init.
7 8 9 10 11 |
# File 'lib/ambient/init.rb', line 7 def initialize(path = nil, project_name = nil, project_prefix = nil) @path = path || Dir.pwd @project_name = project_name || "MyProject" @project_prefix = project_prefix || "com.#{@project_name.downcase}." end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/ambient/init.rb', line 3 def path @path end |
#project_name ⇒ Object (readonly)
Returns the value of attribute project_name.
3 4 5 |
# File 'lib/ambient/init.rb', line 3 def project_name @project_name end |
#project_prefix ⇒ Object (readonly)
Returns the value of attribute project_prefix.
3 4 5 |
# File 'lib/ambient/init.rb', line 3 def project_prefix @project_prefix end |
Instance Method Details
#create_ambientfile ⇒ Object
13 14 15 16 17 |
# File 'lib/ambient/init.rb', line 13 def create_ambientfile puts "# Creating Ambientfile..." write_file puts "File created at #{filepath}" end |