Module: Hypem

Defined in:
lib/hypem.rb,
lib/hypem/blog.rb,
lib/hypem/user.rb,
lib/hypem/track.rb,
lib/hypem/helper.rb,
lib/hypem/request.rb,
lib/hypem/version.rb,
lib/hypem/playlist.rb,
lib/hypem/exceptions.rb,
lib/hypem/track_favorites.rb,
lib/hypem/track_favorites_request.rb

Defined Under Namespace

Modules: Helper Classes: Blog, Playlist, Request, RequestError, Track, TrackFavorites, TrackFavoritesRequest, User

Constant Summary collapse

VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.method_missing(method, *args) ⇒ Object

convenient way of accessing module classes

Raises:

  • (ArgumentError)


17
18
19
20
21
22
23
24
25
# File 'lib/hypem.rb', line 17

def self.method_missing(method, *args)
  method_name = method.capitalize
  raise ArgumentError unless self.const_defined? method_name
  if args.empty?
    self.const_get(method_name)
  else
    self.const_get(method_name).send(:new, *args)
  end
end