Method: CfScript::Scope::App#initialize
- Defined in:
- lib/cf_script/scope/app.rb
#initialize(name_or_info, current_target) ⇒ App
Returns a new instance of App.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cf_script/scope/app.rb', line 14 def initialize(name_or_info, current_target) @current_target = current_target case name_or_info when String, Symbol @name = name_or_info @app_info = nil when CfScript::AppInfo @name = name_or_info.name @app_info = name_or_info else raise "App accepts a name (String or Symbol) or an AppInfo object, " + "but a #{name_or_info.class.name} was given" end cf_self end |