Class: GreenStripes::Artist

Inherits:
Object
  • Object
show all
Defined in:
lib/greenstripes.rb,
ext/greenstripes/greenstripes.c

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



120
121
122
# File 'lib/greenstripes.rb', line 120

def ==(other)
  self.to_link == other.to_link
end

#loaded?Boolean

Returns true if the artist is loaded, false otherwise.

Returns:

  • (Boolean)


978
979
980
981
982
983
# File 'ext/greenstripes/greenstripes.c', line 978

static VALUE artist_loaded(VALUE self)
{
  sp_artist *artist;
  Data_Get_Struct(self, sp_artist, artist);
  return sp_artist_is_loaded(artist) ? Qtrue : Qfalse;
}

#nameString?

Returns the artist’s name.

Returns:



990
991
992
993
994
995
996
# File 'ext/greenstripes/greenstripes.c', line 990

static VALUE artist_name(VALUE self)
{
  sp_artist *artist;
  Data_Get_Struct(self, sp_artist, artist);
  const char *name = sp_artist_name(artist);
  return name ? rb_str_new2(name) : Qnil;
}


116
117
118
# File 'lib/greenstripes.rb', line 116

def to_link
  Link.new(self)
end