Class: StrawberryAPI::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/strawberry_api/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Project

Returns a new instance of Project



39
40
41
42
43
44
45
46
47
# File 'lib/strawberry_api/project.rb', line 39

def initialize(params = {})
  params.each do |k, v|
    if k == 'archive_strategy_state'
      v = ArchiveStrategyState.new(v)
    end

    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#alternative_nameObject

Returns the value of attribute alternative_name



32
33
34
# File 'lib/strawberry_api/project.rb', line 32

def alternative_name
  @alternative_name
end

#archive_strategy_idObject

Returns the value of attribute archive_strategy_id



19
20
21
# File 'lib/strawberry_api/project.rb', line 19

def archive_strategy_id
  @archive_strategy_id
end

#archive_strategy_stateObject

Returns the value of attribute archive_strategy_state



20
21
22
# File 'lib/strawberry_api/project.rb', line 20

def archive_strategy_state
  @archive_strategy_state
end

#archive_strategy_state_idObject

Returns the value of attribute archive_strategy_state_id



21
22
23
# File 'lib/strawberry_api/project.rb', line 21

def archive_strategy_state_id
  @archive_strategy_state_id
end

#created_atObject

Returns the value of attribute created_at



8
9
10
# File 'lib/strawberry_api/project.rb', line 8

def created_at
  @created_at
end

#created_byObject

Returns the value of attribute created_by



15
16
17
# File 'lib/strawberry_api/project.rb', line 15

def created_by
  @created_by
end

#created_by_editObject

Returns the value of attribute created_by_edit



25
26
27
# File 'lib/strawberry_api/project.rb', line 25

def created_by_edit
  @created_by_edit
end

#deletedObject

Returns the value of attribute deleted



26
27
28
# File 'lib/strawberry_api/project.rb', line 26

def deleted
  @deleted
end

#deltaObject

Returns the value of attribute delta



17
18
19
# File 'lib/strawberry_api/project.rb', line 17

def delta
  @delta
end

#encoding_priorityObject

Returns the value of attribute encoding_priority



30
31
32
# File 'lib/strawberry_api/project.rb', line 30

def encoding_priority
  @encoding_priority
end

#frozen_by_idObject

Returns the value of attribute frozen_by_id



11
12
13
# File 'lib/strawberry_api/project.rb', line 11

def frozen_by_id
  @frozen_by_id
end

#fsp_cacheObject

Returns the value of attribute fsp_cache



31
32
33
# File 'lib/strawberry_api/project.rb', line 31

def fsp_cache
  @fsp_cache
end

#idObject

Returns the value of attribute id



5
6
7
# File 'lib/strawberry_api/project.rb', line 5

def id
  @id
end

#is_library_projectObject

Returns the value of attribute is_library_project



23
24
25
# File 'lib/strawberry_api/project.rb', line 23

def is_library_project
  @is_library_project
end

#last_opened_byObject

Returns the value of attribute last_opened_by



14
15
16
# File 'lib/strawberry_api/project.rb', line 14

def last_opened_by
  @last_opened_by
end

#last_opened_by_editObject

Returns the value of attribute last_opened_by_edit



24
25
26
# File 'lib/strawberry_api/project.rb', line 24

def last_opened_by_edit
  @last_opened_by_edit
end

#last_used_atObject

Returns the value of attribute last_used_at



16
17
18
# File 'lib/strawberry_api/project.rb', line 16

def last_used_at
  @last_used_at
end

#locked_byObject

Returns the value of attribute locked_by



10
11
12
# File 'lib/strawberry_api/project.rb', line 10

def locked_by
  @locked_by
end

#mounted_byObject

Returns the value of attribute mounted_by



35
36
37
# File 'lib/strawberry_api/project.rb', line 35

def mounted_by
  @mounted_by
end

#nameObject

Returns the value of attribute name



6
7
8
# File 'lib/strawberry_api/project.rb', line 6

def name
  @name
end

#owner_idObject

Returns the value of attribute owner_id



27
28
29
# File 'lib/strawberry_api/project.rb', line 27

def owner_id
  @owner_id
end

#parentprojectsObject

Returns the value of attribute parentprojects



37
38
39
# File 'lib/strawberry_api/project.rb', line 37

def parentprojects
  @parentprojects
end

#prefixObject

Returns the value of attribute prefix



29
30
31
# File 'lib/strawberry_api/project.rb', line 29

def prefix
  @prefix
end

#quotaObject

Returns the value of attribute quota



28
29
30
# File 'lib/strawberry_api/project.rb', line 28

def quota
  @quota
end

#sizeObject

Returns the value of attribute size



7
8
9
# File 'lib/strawberry_api/project.rb', line 7

def size
  @size
end

#subprojectsObject

Returns the value of attribute subprojects



36
37
38
# File 'lib/strawberry_api/project.rb', line 36

def subprojects
  @subprojects
end

#template_typeObject

Returns the value of attribute template_type



13
14
15
# File 'lib/strawberry_api/project.rb', line 13

def template_type
  @template_type
end

#templatenameObject

Returns the value of attribute templatename



12
13
14
# File 'lib/strawberry_api/project.rb', line 12

def templatename
  @templatename
end

#tiered_atObject

Returns the value of attribute tiered_at



34
35
36
# File 'lib/strawberry_api/project.rb', line 34

def tiered_at
  @tiered_at
end

#tiering_storageObject

Returns the value of attribute tiering_storage



33
34
35
# File 'lib/strawberry_api/project.rb', line 33

def tiering_storage
  @tiering_storage
end

#updated_atObject

Returns the value of attribute updated_at



9
10
11
# File 'lib/strawberry_api/project.rb', line 9

def updated_at
  @updated_at
end

#user_idObject

Returns the value of attribute user_id



18
19
20
# File 'lib/strawberry_api/project.rb', line 18

def user_id
  @user_id
end

Instance Method Details

#archived?Boolean

Shortcut that determines whether the project is archived

Returns:

  • (Boolean)

    Project archived



72
73
74
# File 'lib/strawberry_api/project.rb', line 72

def archived?
  !self.archive_strategy_id.nil?
end

#deleted?Boolean

Shortcut that determines whether the project is deleted

Returns:

  • (Boolean)

    Project deleted



81
82
83
# File 'lib/strawberry_api/project.rb', line 81

def deleted?
  self.deleted
end

#frozen?Boolean

Shortcut that determines whether the project is frozen

Returns:

  • (Boolean)

    Project frozen



63
64
65
# File 'lib/strawberry_api/project.rb', line 63

def frozen?
  !self.frozen_by_id.nil?
end

#locked?Boolean

Shortcut that determines whether the project is locked

Returns:

  • (Boolean)

    Project locked



54
55
56
# File 'lib/strawberry_api/project.rb', line 54

def locked?
  !self.locked_by.nil?
end