Class: KnjController

Inherits:
Rho::RhoController
  • Object
show all
Defined in:
lib/knj/knj_controller.rb

Overview

This files makes the framework able to receive calls from the Rhodes framework from RhoMobile.

Instance Method Summary collapse

Instance Method Details

#callbackObject



12
13
14
15
# File 'lib/knj/knj_controller.rb', line 12

def callback
  block = $rhodes.callbacks(@params["callback_id"])
  block.call(:params => @params)
end


8
9
10
# File 'lib/knj/knj_controller.rb', line 8

def html_links
  System.open_url(@params["url"])
end

#indexObject

GET /Server



4
5
6
# File 'lib/knj/knj_controller.rb', line 4

def index
  render
end

#youtube_embedObject



17
18
19
20
# File 'lib/knj/knj_controller.rb', line 17

def youtube_embed
@iframe_height = System.get_property("screen_height").to_i - 40
render :file => "Knj/rhodes/youtube_embed.erb"
end

#youtube_openObject



22
23
24
# File 'lib/knj/knj_controller.rb', line 22

def youtube_open
render :file => "Knj/rhodes/youtube_open.erb"
end