Class: CfScript::Target
- Inherits:
-
Object
- Object
- CfScript::Target
- Defined in:
- lib/cf_script/object/target.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
readonly
Returns the value of attribute api_endpoint.
-
#org ⇒ Object
readonly
Returns the value of attribute org.
-
#space ⇒ Object
Returns the value of attribute space.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(api_endpoint = '', org = '', space = '', user = nil) ⇒ Target
constructor
A new instance of Target.
- #to_options ⇒ Object
Constructor Details
#initialize(api_endpoint = '', org = '', space = '', user = nil) ⇒ Target
Returns a new instance of Target.
8 9 10 11 12 13 |
# File 'lib/cf_script/object/target.rb', line 8 def initialize(api_endpoint = '', org = '', space = '', user = nil) @api_endpoint = api_endpoint @org = org @space = space @user = user end |
Instance Attribute Details
#api_endpoint ⇒ Object (readonly)
Returns the value of attribute api_endpoint.
2 3 4 |
# File 'lib/cf_script/object/target.rb', line 2 def api_endpoint @api_endpoint end |
#org ⇒ Object (readonly)
Returns the value of attribute org.
4 5 6 |
# File 'lib/cf_script/object/target.rb', line 4 def org @org end |
#space ⇒ Object
Returns the value of attribute space.
6 7 8 |
# File 'lib/cf_script/object/target.rb', line 6 def space @space end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/cf_script/object/target.rb', line 3 def user @user end |
Instance Method Details
#to_options ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/cf_script/object/target.rb', line 15 def = {} [:o] = @org if @org and not @org.empty? [:s] = @space if @space and not @space.empty? end |