Class: Ghub::Models::Application

Inherits:
Struct
  • Object
show all
Defined in:
lib/ghub/models/application.rb

Overview

Defines an application.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplication

Returns a new instance of Application.



29
30
31
32
# File 'lib/ghub/models/application.rb', line 29

def initialize(**)
  super
  freeze
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def description
  @description
end

#eventsObject

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def events
  @events
end

#external_urlObject

Returns the value of attribute external_url

Returns:

  • (Object)

    the current value of external_url



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def external_url
  @external_url
end

#html_urlObject

Returns the value of attribute html_url

Returns:

  • (Object)

    the current value of html_url



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def html_url
  @html_url
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def name
  @name
end

#node_idObject

Returns the value of attribute node_id

Returns:

  • (Object)

    the current value of node_id



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def node_id
  @node_id
end

#ownerObject

Returns the value of attribute owner

Returns:

  • (Object)

    the current value of owner



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def owner
  @owner
end

#permissionsObject

Returns the value of attribute permissions

Returns:

  • (Object)

    the current value of permissions



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def permissions
  @permissions
end

#slugObject

Returns the value of attribute slug

Returns:

  • (Object)

    the current value of slug



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def slug
  @slug
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



6
7
8
# File 'lib/ghub/models/application.rb', line 6

def updated_at
  @updated_at
end

Class Method Details

.for(**attributes) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/ghub/models/application.rb', line 20

def self.for(**attributes)
  new(
    **attributes.merge!(
      owner: Owner[**attributes[:owner]],
      permissions: Permissions::Branch[**attributes[:permissions]]
    )
  )
end