Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Sep 12, 2018
1 parent 0ccecf3 commit 4b89e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions api/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

module Api
# Represents a property type
# rubocop:disable Metrics/ClassLength
class Type < Api::Object::Named
# The list of properties (attr_reader) that can be overridden in
# <provider>.yaml.
Expand All @@ -40,7 +41,6 @@ module Fields

# Can only be overriden - we should never set this ourselves.
attr_reader :new_type

end

include Fields
Expand Down Expand Up @@ -137,7 +137,7 @@ def exclude_if_not_in_version(version)
# thing.
def is_a?(clazz)
return Module.const_get(@new_type).new.is_a?(clazz) if @new_type
return super(clazz)
super(clazz)
end

# Overriding class to enable class overrides.
Expand Down Expand Up @@ -538,4 +538,5 @@ def property_ns_prefix
]
end
end
# rubocop:enable Metrics/ClassLength
end
1 change: 0 additions & 1 deletion provider/property_override.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Provider
# Override a resource property (Api::Type) in api.yaml
# TODO(rosbo): Shared common logic with ResourceOverride via a base class.
class PropertyOverride < Api::Object

attr_reader :new_type

include Api::Type::Fields
Expand Down

0 comments on commit 4b89e54

Please sign in to comment.