Class: LMC::Entity

Inherits:
Object
  • Object
show all
Defined in:
lib/lmc/entity.rb

Direct Known Subclasses

Account

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get_by_uuid_or_name(term) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/lmc/entity.rb', line 5

def self.get_by_uuid_or_name(term)
  raise 'Missing argument' if term.nil?
  begin
    get_by_uuid term
  rescue RestClient::BadRequest, URI::InvalidURIError
    get_by_name term
  end
end

Instance Method Details

#[](key) ⇒ Object



14
15
16
# File 'lib/lmc/entity.rb', line 14

def [](key)
  send(key)
end