Class: Resolver
- Inherits:
-
Object
- Object
- Resolver
- Defined in:
- frontend/app/models/resolver.rb
Instance Attribute Summary collapse
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#edit_uri ⇒ Object
-
#initialize(uri) ⇒ Resolver
constructor
A new instance of Resolver.
-
#view_uri ⇒ Object
Constructor Details
#initialize(uri) ⇒ Resolver
Returns a new instance of Resolver.
4 5 6 7 8 9 10 11 12 13 |
# File 'frontend/app/models/resolver.rb', line 4 def initialize(uri) @uri = uri jsonmodel_properties = JSONModel.parse_reference(@uri) @id = jsonmodel_properties[:id] @repository = jsonmodel_properties[:repository] @jsonmodel_type = jsonmodel_properties[:type] @repo_id = JSONModel.parse_reference(@repository)[:id] if @repository end |
Instance Attribute Details
#repository ⇒ Object (readonly)
Returns the value of attribute repository
2 3 4 |
# File 'frontend/app/models/resolver.rb', line 2 def repository @repository end |
Instance Method Details
#edit_uri ⇒ Object
16 17 18 19 20 21 22 |
# File 'frontend/app/models/resolver.rb', line 16 def edit_uri uri_properties = default_uri_properties uri_properties[:action] = :edit uri_properties end |
#view_uri ⇒ Object
25 26 27 28 29 30 31 |
# File 'frontend/app/models/resolver.rb', line 25 def view_uri uri_properties = default_uri_properties uri_properties[:action] = :show uri_properties end |