Class: ODDB::State::User::DownloadExport

Inherits:
Global show all
Defined in:
src/state/user/download_export.rb

Constant Summary

VIEW =
View::User::DownloadExport
DIRECT_EVENT =
:download_export

Constants inherited from Global

HOME_STATE, ZONE, ZONE_NAVIGATION

Constants inherited from Global

DIRECT_EVENT, GLOBAL_MAP, HOME_STATE, LIMITED, PRINT_STATES, READONLY_STATES, RESOLVE_STATES, REVERSE_MAP, VIEW, ZONE_NAVIGATION

Constants included from UmlautSort

FILTER_PAIRS

Class Method Summary (collapse)

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #allowed?, #atc_chooser, #checkout, #clear_interaction_basket, #creditable?, #direct_request_path, #doctorlist, #download, #export_csv, #extend, #fachinfo, #feedbacks, #help_navigation, #home_navigation, #home_state, #hospitallist, #interaction_basket, #limit_state, #limited?, #logout, #navigation, #notify, #password_reset, #paypal_return, #powerlink, #print, #proceed_download, #proceed_poweruser, #resolve, #resolve_state, #rss, #search, #show, #snapback_event, #sort, #sponsorlink, #suggest_address, #switch, #unique_email, #user_input, #user_navigation, #ywesee_contact, #zone_navigation, #zones

Methods included from Admin::LoginMethods

#autologin, #login

Methods included from UmlautSort

#sort_model, #umlaut_filter

Class Method Details

+ (Object) duration(file)

Number of Days during which a paid file may be downloaded



16
17
18
# File 'src/state/user/download_export.rb', line 16

def DownloadExport.duration(file)
  DOWNLOAD_EXPORT_DURATIONS[fuzzy_key(file)].to_i
end

+ (Object) fuzzy_key(file)



19
20
21
22
23
24
25
26
# File 'src/state/user/download_export.rb', line 19

def DownloadExport.fuzzy_key(file)
  DOWNLOAD_EXPORT_PRICES.each_key { |key|
    if(file.index(key))
      return key
    end
  }
  nil
end

+ (Object) price(file)



27
28
29
# File 'src/state/user/download_export.rb', line 27

def DownloadExport.price(file)
  DOWNLOAD_EXPORT_PRICES[fuzzy_key(file)].to_f
end

+ (Object) subscription_duration(file)



30
31
32
# File 'src/state/user/download_export.rb', line 30

def DownloadExport.subscription_duration(file)
  DOWNLOAD_EXPORT_SUBSCRIPTION_DURATIONS[fuzzy_key(file)].to_i
end

+ (Object) subscription_price(file)



33
34
35
# File 'src/state/user/download_export.rb', line 33

def DownloadExport.subscription_price(file)
  DOWNLOAD_EXPORT_SUBSCRIPTION_PRICES[fuzzy_key(file)].to_f
end