Class: Sentiero::Web::Views::FormsView

Inherits:
BaseView
  • Object
show all
Defined in:
lib/sentiero/web/views/forms_view.rb

Constant Summary

Constants inherited from BaseView

BaseView::TEMPLATES_DIR, BaseView::TEMPLATE_CACHE

Constants included from Escaping

Escaping::HTML_UNSAFE_IN_SCRIPT, Escaping::HTML_UNSAFE_IN_SCRIPT_PATTERN

Instance Attribute Summary collapse

Attributes inherited from BaseView

#base_path, #csrf_token

Instance Method Summary collapse

Methods inherited from BaseView

#built_asset, compiled_template, #escape_js, #h, #range_pairs, #render, #render_layout, #render_partial, #render_session_row

Methods included from Formatting

#format_duration, #format_vital, #parse_browser, #parse_device

Methods included from Escaping

#escape_html, #escape_js_string, #escape_json

Constructor Details

#initialize(sessions_started:, sessions_completed:, completion_rate:, total_submits:, fields:, drop_off_fields:, was_truncated:, since:, until_str:) ⇒ FormsView

Returns a new instance of FormsView.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/sentiero/web/views/forms_view.rb', line 9

def initialize(sessions_started:, sessions_completed:, completion_rate:, total_submits:, fields:, drop_off_fields:, was_truncated:, since:, until_str:)
  super()
  @sessions_started = sessions_started
  @sessions_completed = sessions_completed
  @completion_rate = completion_rate
  @total_submits = total_submits
  @fields = fields
  @drop_off_fields = drop_off_fields
  @was_truncated = was_truncated
  @since = since
  @until_str = until_str
end

Instance Attribute Details

#completion_rateObject (readonly)

Returns the value of attribute completion_rate.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def completion_rate
  @completion_rate
end

#drop_off_fieldsObject (readonly)

Returns the value of attribute drop_off_fields.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def drop_off_fields
  @drop_off_fields
end

#fieldsObject (readonly)

Returns the value of attribute fields.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def fields
  @fields
end

#sessions_completedObject (readonly)

Returns the value of attribute sessions_completed.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def sessions_completed
  @sessions_completed
end

#sessions_startedObject (readonly)

Returns the value of attribute sessions_started.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def sessions_started
  @sessions_started
end

#sinceObject (readonly)

Returns the value of attribute since.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def since
  @since
end

#total_submitsObject (readonly)

Returns the value of attribute total_submits.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def total_submits
  @total_submits
end

#until_strObject (readonly)

Returns the value of attribute until_str.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def until_str
  @until_str
end

#was_truncatedObject (readonly)

Returns the value of attribute was_truncated.



22
23
24
# File 'lib/sentiero/web/views/forms_view.rb', line 22

def was_truncated
  @was_truncated
end

Instance Method Details

#templateObject



24
# File 'lib/sentiero/web/views/forms_view.rb', line 24

def template = "forms.html.erb"