Class: Target
- Inherits:
-
Object
- Object
- Target
- Defined in:
- lib/ff/ruby/server/sdk/dto/target.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#is_private ⇒ Object
Returns the value of attribute is_private.
-
#name ⇒ Object
Returns the value of attribute name.
-
#private_attributes ⇒ Object
Returns the value of attribute private_attributes.
Instance Method Summary collapse
-
#initialize(name, identifier = name, attributes = {}, is_private = false) ⇒ Target
constructor
A new instance of Target.
- #is_valid ⇒ Object
Constructor Details
#initialize(name, identifier = name, attributes = {}, is_private = false) ⇒ Target
Returns a new instance of Target.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 5 def initialize( name, identifier = name, attributes = {}, is_private = false ) @name = name @identifier = identifier @attributes = attributes == nil ? {} : attributes.transform_keys(&:to_sym) @is_private = is_private @private_attributes = Set[] end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 3 def attributes @attributes end |
#identifier ⇒ Object
Returns the value of attribute identifier.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 3 def identifier @identifier end |
#is_private ⇒ Object
Returns the value of attribute is_private.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 3 def is_private @is_private end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 3 def name @name end |
#private_attributes ⇒ Object
Returns the value of attribute private_attributes.
3 4 5 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 3 def private_attributes @private_attributes end |
Instance Method Details
#is_valid ⇒ Object
20 21 22 23 |
# File 'lib/ff/ruby/server/sdk/dto/target.rb', line 20 def is_valid @identifier != nil && !@identifier.strip.empty? end |