Class: Dspace::Policy
- Inherits:
-
Object
- Object
- Dspace::Policy
- Defined in:
- lib/dspace/policy.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#eperson_id ⇒ Object
readonly
Returns the value of attribute eperson_id.
-
#group_id ⇒ Object
readonly
Returns the value of attribute group_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#rp_description ⇒ Object
readonly
Returns the value of attribute rp_description.
-
#rp_name ⇒ Object
readonly
Returns the value of attribute rp_name.
-
#rp_type ⇒ Object
readonly
Returns the value of attribute rp_type.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
Instance Method Summary collapse
-
#initialize(args) ⇒ Policy
constructor
A new instance of Policy.
- #to_h ⇒ Object
Constructor Details
#initialize(args) ⇒ Policy
Returns a new instance of Policy.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dspace/policy.rb', line 8 def initialize args @id = args['id'] @action = args['action'] @eperson_id = args['epersonId'] @group_id = args['groupId'] @resource_id = args['resourceId'] @resource_type = args['resourceType'] @rp_description = args['rpDescription'] @rp_name = args['rpName'] @rp_type = args['rpType'] @start_date = args['startDate'] @end_date = args['endDate'] end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def action @action end |
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def end_date @end_date end |
#eperson_id ⇒ Object (readonly)
Returns the value of attribute eperson_id.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def eperson_id @eperson_id end |
#group_id ⇒ Object (readonly)
Returns the value of attribute group_id.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def group_id @group_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def id @id end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def resource_id @resource_id end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def resource_type @resource_type end |
#rp_description ⇒ Object (readonly)
Returns the value of attribute rp_description.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def rp_description @rp_description end |
#rp_name ⇒ Object (readonly)
Returns the value of attribute rp_name.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def rp_name @rp_name end |
#rp_type ⇒ Object (readonly)
Returns the value of attribute rp_type.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def rp_type @rp_type end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
4 5 6 |
# File 'lib/dspace/policy.rb', line 4 def start_date @start_date end |
Instance Method Details
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/dspace/policy.rb', line 22 def to_h { id: @id, action: @action, epersonId: @eperson_id, groupId: @group_id, resourceId: @resource_id, resourceType: @resource_type, rpDescription: @rp_description, rpName: @rp_name, rpType: @rp_type, startDate: @start_date, endDate: @end_date } end |