Module: RubyNative::Helper

Defined in:
lib/ruby_native/helper.rb

Instance Method Summary collapse

Instance Method Details

#native_app?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/ruby_native/helper.rb', line 3

def native_app?
  request.user_agent.to_s.include?("Ruby Native")
end

#native_form_tagObject



11
12
13
# File 'lib/ruby_native/helper.rb', line 11

def native_form_tag
  tag.div(data: { native_form: true }, hidden: true)
end

#native_push_tagObject



15
16
17
# File 'lib/ruby_native/helper.rb', line 15

def native_push_tag
  tag.div(data: { native_push: true }, hidden: true)
end

#native_tabs_tagObject



7
8
9
# File 'lib/ruby_native/helper.rb', line 7

def native_tabs_tag
  tag.div(data: { native_tabs: true }, hidden: true)
end