Class: Rafflesia::RepositoryRef

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/repository_ref.rb

Constant Summary collapse

HASH_ATTRS =
{
  full_name: :full_name,
  id: :id,
  kind: :kind,
  namespace: :namespace,
  object: :object,
  slug: :slug
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ RepositoryRef

Returns a new instance of RepositoryRef.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/foundry/repository_ref.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @full_name = hash[:full_name]
  @id = hash[:id]
  @kind = hash[:kind]
  @namespace = hash[:namespace]
  @object = hash[:object]
  @slug = hash[:slug]
end

Instance Attribute Details

#full_nameObject

Returns the value of attribute full_name.



17
18
19
# File 'lib/rafflesia/foundry/repository_ref.rb', line 17

def full_name
  @full_name
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/rafflesia/foundry/repository_ref.rb', line 17

def id
  @id
end

#kindObject

Returns the value of attribute kind.



17
18
19
# File 'lib/rafflesia/foundry/repository_ref.rb', line 17

def kind
  @kind
end

#namespaceObject

Returns the value of attribute namespace.



17
18
19
# File 'lib/rafflesia/foundry/repository_ref.rb', line 17

def namespace
  @namespace
end

#objectObject

Returns the value of attribute object.



17
18
19
# File 'lib/rafflesia/foundry/repository_ref.rb', line 17

def object
  @object
end

#slugObject

Returns the value of attribute slug.



17
18
19
# File 'lib/rafflesia/foundry/repository_ref.rb', line 17

def slug
  @slug
end