Class: MetadataPresenter::Expression
- Inherits:
-
Metadata
- Object
- Metadata
- MetadataPresenter::Expression
show all
- Defined in:
- app/models/metadata_presenter/expression.rb
Instance Attribute Summary collapse
Attributes inherited from Metadata
#metadata
Instance Method Summary
collapse
Methods inherited from Metadata
#editor?, #id, #initialize, #method_missing, #respond_to_missing?, #to_json, #type, #uuid
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
3
4
5
|
# File 'app/models/metadata_presenter/expression.rb', line 3
def service
@service
end
|
Instance Method Details
#==(other) ⇒ Object
5
6
7
|
# File 'app/models/metadata_presenter/expression.rb', line 5
def ==(other)
metadata == other.metadata
end
|
#expression_component ⇒ Object
13
14
15
|
# File 'app/models/metadata_presenter/expression.rb', line 13
def expression_component
@expression_component ||= expression_page.find_component_by_uuid(component)
end
|
#expression_field ⇒ Object
17
18
19
|
# File 'app/models/metadata_presenter/expression.rb', line 17
def expression_field
expression_component.find_item_by_uuid(field)
end
|
#expression_page ⇒ Object
9
10
11
|
# File 'app/models/metadata_presenter/expression.rb', line 9
def expression_page
@expression_page ||= service.find_page_by_uuid(page)
end
|
#field_label ⇒ Object
21
22
23
|
# File 'app/models/metadata_presenter/expression.rb', line 21
def field_label
expression_field['label'] if expression_field
end
|