Class: Smartfm::List::Application
- Defined in:
- lib/smartfm/models/list.rb
Constant Summary collapse
- ATTRIBUTES =
[:application, :available, :progress, :list_id, :lang]
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize(params = {}) ⇒ Application
constructor
A new instance of Application.
Methods inherited from Base
Constructor Details
#initialize(params = {}) ⇒ Application
Returns a new instance of Application.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/smartfm/models/list.rb', line 19 def initialize(params = {}) @application = case when params[:iknow] then :iknow when params[:dictation] then :dictation when params[:brainspeed] then :brainspeed end @available = params[self.application][:available] @progress = params[self.application][:progress] @href = params[self.application][:href] @list_id = params[:list_id] @lang = params[:lang] end |
Instance Method Details
#available? ⇒ Boolean
32 33 34 |
# File 'lib/smartfm/models/list.rb', line 32 def available? self.available end |