Class: Timebox::TimeboxStruct

Inherits:
Struct
  • Object
show all
Defined in:
app/models/concerns/timebox.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_nameObject

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



11
12
13
# File 'app/models/concerns/timebox.rb', line 11

def class_name
  @class_name
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



11
12
13
# File 'app/models/concerns/timebox.rb', line 11

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



11
12
13
# File 'app/models/concerns/timebox.rb', line 11

def name
  @name
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



11
12
13
# File 'app/models/concerns/timebox.rb', line 11

def title
  @title
end

Class Method Details

.declarative_policy_classObject



17
18
19
# File 'app/models/concerns/timebox.rb', line 17

def self.declarative_policy_class
  "TimeboxPolicy"
end

Instance Method Details

#serializable_hash(_opts = {}) ⇒ Object

Ensure these models match the interface required for exporting



13
14
15
# File 'app/models/concerns/timebox.rb', line 13

def serializable_hash(_opts = {})
  { title: title, name: name, id: id }
end

#to_global_idObject



21
22
23
# File 'app/models/concerns/timebox.rb', line 21

def to_global_id
  ::Gitlab::GlobalId.build(self, model_name: class_name, id: id)
end