Class: Types::Notes::DiffPositionType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/notes/diff_position_type.rb

Overview

rubocop: disable Graphql/AuthorizeTypes This is presented through ‘NoteType` that has its own authorization

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#heightObject



60
61
62
# File 'app/graphql/types/notes/diff_position_type.rb', line 60

def height
  object.height if object.on_image?
end

#new_lineObject



44
45
46
# File 'app/graphql/types/notes/diff_position_type.rb', line 44

def new_line
  object.new_line if object.on_text?
end

#old_lineObject



40
41
42
# File 'app/graphql/types/notes/diff_position_type.rb', line 40

def old_line
  object.old_line if object.on_text?
end

#widthObject



56
57
58
# File 'app/graphql/types/notes/diff_position_type.rb', line 56

def width
  object.width if object.on_image?
end

#xObject



48
49
50
# File 'app/graphql/types/notes/diff_position_type.rb', line 48

def x
  object.x if object.on_image?
end

#yObject



52
53
54
# File 'app/graphql/types/notes/diff_position_type.rb', line 52

def y
  object.y if object.on_image?
end