Class: Consent::Action
- Inherits:
-
Object
- Object
- Consent::Action
- Defined in:
- lib/consent/action.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #default_view ⇒ Object
-
#initialize(key, label, options = {}) ⇒ Action
constructor
A new instance of Action.
- #view_keys ⇒ Object
Constructor Details
#initialize(key, label, options = {}) ⇒ Action
Returns a new instance of Action.
7 8 9 10 11 |
# File 'lib/consent/action.rb', line 7 def initialize(key, label, = {}) @key = key @label = label @options = end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/consent/action.rb', line 5 def key @key end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/consent/action.rb', line 5 def label @label end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/consent/action.rb', line 5 def @options end |
Instance Method Details
#default_view ⇒ Object
17 18 19 |
# File 'lib/consent/action.rb', line 17 def default_view @options[:default_view] end |
#view_keys ⇒ Object
13 14 15 |
# File 'lib/consent/action.rb', line 13 def view_keys @options.fetch(:views, []) end |