Class: MetadataPresenter::Expression

Inherits:
Metadata
  • Object
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

Constructor Details

This class inherits a constructor from MetadataPresenter::Metadata

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MetadataPresenter::Metadata

Instance Attribute Details

#serviceObject

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)
   == other.
end

#expression_componentObject



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_fieldObject



17
18
19
# File 'app/models/metadata_presenter/expression.rb', line 17

def expression_field
  expression_component.find_item_by_uuid(field)
end

#expression_pageObject



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_labelObject



21
22
23
# File 'app/models/metadata_presenter/expression.rb', line 21

def field_label
  expression_field['label'] if expression_field
end