Class: Hydra::Config::PermissionsConfig::GroupPermission
- Inherits:
-
Object
- Object
- Hydra::Config::PermissionsConfig::GroupPermission
- Defined in:
- lib/hydra/config.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
Returns the value of attribute group.
-
#individual ⇒ Object
Returns the value of attribute individual.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(values = {}) ⇒ GroupPermission
constructor
A new instance of GroupPermission.
- #merge!(values) ⇒ Object
Constructor Details
#initialize(values = {}) ⇒ GroupPermission
Returns a new instance of GroupPermission.
167 168 169 |
# File 'lib/hydra/config.rb', line 167 def initialize(values = {}) merge! values end |
Instance Attribute Details
#group ⇒ Object
Returns the value of attribute group.
166 167 168 |
# File 'lib/hydra/config.rb', line 166 def group @group end |
#individual ⇒ Object
Returns the value of attribute individual.
166 167 168 |
# File 'lib/hydra/config.rb', line 166 def individual @individual end |
Instance Method Details
#[](key) ⇒ Object
174 175 176 177 178 179 180 181 |
# File 'lib/hydra/config.rb', line 174 def [] key case key when :group, :individual send key else raise "Unknown key" end end |
#merge!(values) ⇒ Object
170 171 172 173 |
# File 'lib/hydra/config.rb', line 170 def merge! values @group = values[:group] @individual = values[:individual] end |