Class: RPlatform::Rails::CanvasPathStatusCheck

Inherits:
StatusCheck
  • Object
show all
Defined in:
lib/rplatform_rails/status_manager.rb

Instance Method Summary collapse

Methods inherited from StatusCheck

#message, #valid?

Constructor Details

#initialize(controller) ⇒ CanvasPathStatusCheck

Returns a new instance of CanvasPathStatusCheck.



165
166
167
168
169
170
171
172
# File 'lib/rplatform_rails/status_manager.rb', line 165

def initialize(controller)
  @controller = controller
  @valid = false
  begin
    @valid = @controller.facebook_canvas_path.size > 0
  rescue
  end
end

Instance Method Details

#invalid_messageObject



182
183
184
185
186
187
188
189
# File 'lib/rplatform_rails/status_manager.rb', line 182

def invalid_message
  begin
    FACEBOOK[:test]
    return "you need to define <strong>canvas_path</strong> in facebook.yml"
  rescue
    return "you need to define s<strong>facebook_canvas_path</strong> in your controller"
  end
end

#titleObject



174
175
176
# File 'lib/rplatform_rails/status_manager.rb', line 174

def title
  "facebook_canvas_path"
end

#valid_messageObject



178
179
180
# File 'lib/rplatform_rails/status_manager.rb', line 178

def valid_message
  @controller.facebook_canvas_path
end