Module: Locomotive::DevelopersDocumentationHelper
- Defined in:
- app/helpers/locomotive/developers_documentation_helper.rb
Instance Method Summary collapse
- #current_locomotive_account_email_parameter ⇒ Object
- #current_request_url ⇒ Object
- #current_site_api_key_parameter ⇒ Object
- #current_site_handle_parameter ⇒ Object
- #current_site_name_with_underscores ⇒ Object
- #developer_documentation_wagon_clone_string ⇒ Object
Instance Method Details
#current_locomotive_account_email_parameter ⇒ Object
24 25 26 |
# File 'app/helpers/locomotive/developers_documentation_helper.rb', line 24 def current_locomotive_account_email_parameter ['-e', current_locomotive_account.email].join(' ') end |
#current_request_url ⇒ Object
16 17 18 |
# File 'app/helpers/locomotive/developers_documentation_helper.rb', line 16 def current_request_url [request.scheme, '://', request.host_with_port].join end |
#current_site_api_key_parameter ⇒ Object
28 29 30 |
# File 'app/helpers/locomotive/developers_documentation_helper.rb', line 28 def current_site_api_key_parameter ['-a', current_locomotive_account.api_key].join(' ') end |
#current_site_handle_parameter ⇒ Object
20 21 22 |
# File 'app/helpers/locomotive/developers_documentation_helper.rb', line 20 def current_site_handle_parameter ['-h', current_site.handle].join(' ') end |
#current_site_name_with_underscores ⇒ Object
12 13 14 |
# File 'app/helpers/locomotive/developers_documentation_helper.rb', line 12 def current_site_name_with_underscores current_site.name.underscore.gsub(/(\W+)/, '_') end |
#developer_documentation_wagon_clone_string ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/helpers/locomotive/developers_documentation_helper.rb', line 3 def developer_documentation_wagon_clone_string [ 'wagon clone', current_site_name_with_underscores, current_request_url, current_site_handle_parameter, current_locomotive_account_email_parameter, current_site_api_key_parameter].join(' ') end |