Class: GreenStripes::Artist
- Inherits:
-
Object
- Object
- GreenStripes::Artist
- Defined in:
- lib/greenstripes.rb,
ext/greenstripes/greenstripes.c
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#loaded? ⇒ Boolean
Returns true if the artist is loaded, false otherwise.
-
#name ⇒ String?
Returns the artist’s name.
- #to_link ⇒ Object
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.
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;
}
|
#name ⇒ String?
Returns the artist’s name.
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;
}
|