Module: Menilite::Helper
- Included in:
- Menilite, Model, Model, Model::Validator
- Defined in:
- lib/menilite/helper.rb
Instance Method Summary collapse
Instance Method Details
#client? ⇒ Boolean
7 8 9 |
# File 'lib/menilite/helper.rb', line 7 def client? RUBY_ENGINE == 'opal' end |
#if_client(&block) ⇒ Object
15 16 17 |
# File 'lib/menilite/helper.rb', line 15 def if_client(&block) block.call if client? end |
#if_server(&block) ⇒ Object
11 12 13 |
# File 'lib/menilite/helper.rb', line 11 def if_server(&block) block.call if server? end |
#server? ⇒ Boolean
3 4 5 |
# File 'lib/menilite/helper.rb', line 3 def server? !client? end |