Class: CultomePlayer::Objects::Drive
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CultomePlayer::Objects::Drive
- Includes:
- Utils
- Defined in:
- lib/cultome_player/objects/drive.rb
Overview
The ActiveRecord model for Drive objects.
Instance Method Summary collapse
Methods included from Utils
#arrange_in_columns, #display, #display_over, #ensure_db_schema, #is_true_value?, #recreate_db_schema, #swallow_stdout, #to_display_list, #with_connection
Instance Method Details
#connected? ⇒ Boolean
12 13 14 |
# File 'lib/cultome_player/objects/drive.rb', line 12 def connected? connected end |
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cultome_player/objects/drive.rb', line 16 def to_s str = c4(":::: Drive: ") str += c14(self.name) str += c4(" => ") str += c14(self.songs.size.to_s) str += c4(" songs => ") str += c14(self.path) str += c4(" => ") str += connected ? c3("Online") : c2("Offline") str += c4(" ::::") end |