Class: OpenLoam::Widgets::Widget
- Inherits:
-
Struct
- Object
- Struct
- OpenLoam::Widgets::Widget
- Defined in:
- lib/open_loam/widgets.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#roles ⇒ Object
Returns the value of attribute roles.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
16 17 18 |
# File 'lib/open_loam/widgets.rb', line 16 def key @key end |
#provider ⇒ Object
Returns the value of attribute provider
16 17 18 |
# File 'lib/open_loam/widgets.rb', line 16 def provider @provider end |
#roles ⇒ Object
Returns the value of attribute roles
16 17 18 |
# File 'lib/open_loam/widgets.rb', line 16 def roles @roles end |
#title ⇒ Object
Returns the value of attribute title
16 17 18 |
# File 'lib/open_loam/widgets.rb', line 16 def title @title end |
Instance Method Details
#visible_to?(role) ⇒ Boolean
17 18 19 |
# File 'lib/open_loam/widgets.rb', line 17 def visible_to?(role) roles.nil? || Array(roles).map(&:to_s).include?(role.to_s) end |