lib/gooddata/models/metadata/metric.rb in gooddata-0.6.51 vs lib/gooddata/models/metadata/metric.rb in gooddata-0.6.52
- old
+ new
@@ -16,11 +16,14 @@
class << self
# Method intended to get all objects of that type in a specified project
#
# @param options [Hash] the options hash
- # @option options [Boolean] :full if passed true the subclass can decide to pull in full objects. This is desirable from the usability POV but unfortunately has negative impact on performance so it is not the default
+ # @option options [Boolean] :full if passed true the subclass can decide
+ # to pull in full objects. This is desirable from the usability POV
+ # but unfortunately has negative impact on performance so it is not
+ # the default.
# @return [Array<GoodData::MdObject> | Array<Hash>] Return the appropriate metadata objects or their representation
def all(options = { :client => GoodData.connection, :project => GoodData.project })
query('metric', Metric, options)
end
@@ -137,11 +140,14 @@
def metric?
true
end
- # Checks that the expression contains certain metadata object. The difference between this and used_by using is in the fact that this is not a transitive closure. it searches only inside the expression
+ # Checks that the expression contains certain metadata object.
+ # The difference between this and used_by using is in the fact that this
+ # is not a transitive closure. it searches only inside the expression
+ #
# @param [GoodData::MdObject] item Object that is going to be looked up
# @return [Boolean]
def contain?(item)
uri = item.respond_to?(:uri) ? item.uri : item
expression[uri] != nil
@@ -154,10 +160,12 @@
def contain_value?(label, value)
uri = label.find_value_uri(value)
contain?(uri)
end
- # Method used for replacing values in their state according to mapping. Can be used to replace any values but it is typically used to replace the URIs. Returns a new object of the same type.
+ # Method used for replacing values in their state according to mapping.
+ # Can be used to replace any values but it is typically used to replace
+ # the URIs. Returns a new object of the same type.
#
# @param [Array<Array>]Mapping specifying what should be exchanged for what. As mapping should be used output of GoodData::Helpers.prepare_mapping.
# @return [GoodData::Metric]
def replace(mapping)
x = GoodData::MdObject.replace_quoted(self, mapping)