Class: Jiraby::Entity
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Jiraby::Entity
- Defined in:
- lib/jiraby/entity.rb
Overview
Represents some data structure in Jira, as it would be returned by a REST API method.
Direct Known Subclasses
Instance Method Summary collapse
-
#key(*args) ⇒ Object
If no
argsare given, return the value in thekeyfield (often used as an identifier in Jira).
Instance Method Details
#key(*args) ⇒ Object
If no args are given, return the value in the key field (often used
as an identifier in Jira). If args are given, pass-through to Hash's
regular key method (returning the key for a given value).
10 11 12 13 14 15 16 17 |
# File 'lib/jiraby/entity.rb', line 10 def key(*args) # Pass-through to Hash's `key` method if args.length > 0 super(*args) else return self['key'] end end |