Class: GoodData::Model::AttributeBlueprintField
- Inherits:
-
BlueprintField
- Object
- BlueprintField
- GoodData::Model::AttributeBlueprintField
- Defined in:
- lib/gooddata/models/blueprint/attribute_field.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BlueprintField
Instance Method Summary collapse
-
#labels ⇒ Array
Returns list of labels on the attribute.
-
#validate ⇒ Array
Validates the fields in the attribute.
Methods inherited from BlueprintField
#==, #id, #in_project, #initialize, #method_missing, #respond_to?, #title
Constructor Details
This class inherits a constructor from GoodData::Model::BlueprintField
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class GoodData::Model::BlueprintField
Instance Method Details
#labels ⇒ Array
Returns list of labels on the attribute. There has to be always at least one attribute
15 16 17 |
# File 'lib/gooddata/models/blueprint/attribute_field.rb', line 15 def labels @dataset_blueprint.labels_for_attribute(self) end |
#validate ⇒ Array
Validates the fields in the attribute
22 23 24 25 26 |
# File 'lib/gooddata/models/blueprint/attribute_field.rb', line 22 def validate validate_presence_of(:id).map do |e| { type: :error, message: "Field \"#{e}\" is not defined or empty for attribute \"#{id}\"" } end end |