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.
176 177 178 |
# File 'lib/hydra/config.rb', line 176 def initialize(values = {}) merge! values end |
Instance Attribute Details
#group ⇒ Object
Returns the value of attribute group.
175 176 177 |
# File 'lib/hydra/config.rb', line 175 def group @group end |
#individual ⇒ Object
Returns the value of attribute individual.
175 176 177 |
# File 'lib/hydra/config.rb', line 175 def individual @individual end |
Instance Method Details
#[](key) ⇒ Object
183 184 185 186 187 188 189 190 |
# File 'lib/hydra/config.rb', line 183 def [] key case key when :group, :individual send key else raise "Unknown key" end end |
#merge!(values) ⇒ Object
179 180 181 182 |
# File 'lib/hydra/config.rb', line 179 def merge! values @group = values[:group] @individual = values[:individual] end |