Class: FrontEndBuilds::App

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/front_end_builds/app.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get_url(name) ⇒ Object



31
32
33
34
# File 'app/models/front_end_builds/app.rb', line 31

def self.get_url(name)
  @_url ||= {}
  @_url[name.to_sym]
end

.register_url(name, url) ⇒ Object



26
27
28
29
# File 'app/models/front_end_builds/app.rb', line 26

def self.register_url(name, url)
  @_url ||= {}
  @_url[name.to_sym] = url
end

Instance Method Details

#get_urlObject



36
37
38
# File 'app/models/front_end_builds/app.rb', line 36

def get_url
  self.class.get_url(name)
end

#serializeObject



40
41
42
43
44
45
46
47
48
49
# File 'app/models/front_end_builds/app.rb', line 40

def serialize
  {
    id: id,
    name: name,
    build_ids: recent_builds.map(&:id),
    live_build_id: (live_build ? live_build.id : nil),
    location: get_url,
    require_manual_activation: require_manual_activation
  }
end