Class: LeanTesting::Entity
- Inherits:
-
Object
- Object
- LeanTesting::Entity
- Defined in:
- lib/BaseClass/Entity.rb
Direct Known Subclasses
Bug, BugAttachment, BugComment, PlatformBrowser, PlatformBrowserVersion, PlatformDevice, PlatformOS, PlatformOSVersion, PlatformType, Project, ProjectBugScheme, ProjectSection, ProjectUser, ProjectVersion, UserOrganization
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(origin, data) ⇒ Entity
constructor
Constructs an Entity instance.
Constructor Details
#initialize(origin, data) ⇒ Entity
Constructs an Entity instance
Arguments: origin Client – Original client instance reference data Hash – Data to be contained in the new Entity. Must be non-empty.
Exceptions: SDKInvalidArgException if provided data param is not a hash. SDKInvalidArgException if provided data param is empty. Entities cannot be empty.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/BaseClass/Entity.rb', line 22 def initialize(origin, data) if !data.is_a? Hash raise SDKInvalidArgException, '`data` must be a hash' elsif data.length.zero? raise SDKInvalidArgException, '`data` must be non-empty' end @origin = origin @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
6 7 8 |
# File 'lib/BaseClass/Entity.rb', line 6 def data @data end |