Class: Jiraby::Entity

Inherits:
Hashie::Mash
  • Object
show all
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

Project

Instance Method Summary collapse

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