Class: GoodData::Model::BridgeBlueprintField
- Inherits:
-
BlueprintField
- Object
- BlueprintField
- GoodData::Model::BridgeBlueprintField
- Defined in:
- lib/gooddata/models/blueprint/bridge_field.rb
Instance Attribute Summary
Attributes inherited from BlueprintField
Instance Method Summary collapse
-
#bridge ⇒ String
Returns the string bridge of the ref which is string Id of dataset that is bridged.
-
#dataset ⇒ GoodData::Model::SchemaBlueprint
Returns the schema that is referenced by this ref.
-
#in_project(_project) ⇒ GoodData::MdObject
Returns the md object in associated project or throws error if not present.
-
#validate ⇒ Array
Validates the fields in the ref.
Methods inherited from BlueprintField
#==, #id, #initialize, #method_missing, #respond_to_missing?, #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
#bridge ⇒ String
Returns the string bridge of the ref which is string Id of dataset that is bridged.
22 23 24 |
# File 'lib/gooddata/models/blueprint/bridge_field.rb', line 22 def bridge data[:dataset] end |
#dataset ⇒ GoodData::Model::SchemaBlueprint
Returns the schema that is referenced by this ref
15 16 17 |
# File 'lib/gooddata/models/blueprint/bridge_field.rb', line 15 def dataset dataset_blueprint.find_dataset(bridge, include_date_dimensions: true) end |
#in_project(_project) ⇒ GoodData::MdObject
Returns the md object in associated project or throws error if not present
38 39 40 |
# File 'lib/gooddata/models/blueprint/bridge_field.rb', line 38 def in_project(_project) fail NotImplementedError, 'Reference does not have representation as an object in datamart' end |
#validate ⇒ Array
Validates the fields in the ref
29 30 31 32 33 |
# File 'lib/gooddata/models/blueprint/bridge_field.rb', line 29 def validate validate_presence_of(:dataset).map do |e| { type: :error, message: "Field \"#{e}\" is not defined or empty for bridge \"#{data}\"" } end end |