Method: OSDNClient::ProjectBzr#initialize

Defined in:
lib/osdn-client/models/project_bzr.rb

#initialize(attributes = {}) ⇒ ProjectBzr

Initializes the object



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/osdn-client/models/project_bzr.rb', line 104

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'created')
    self.created = attributes[:'created']
  end

  if attributes.has_key?(:'active')
    self.active = attributes[:'active']
  end

  if attributes.has_key?(:'setting_applied')
    self.setting_applied = attributes[:'setting_applied']
  end

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.has_key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.has_key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.has_key?(:'mail_enabled')
    self.mail_enabled = attributes[:'mail_enabled']
  end

  if attributes.has_key?(:'mail_recipients')
    self.mail_recipients = attributes[:'mail_recipients']
  end

  if attributes.has_key?(:'url_viewer')
    self.url_viewer = attributes[:'url_viewer']
  end

  if attributes.has_key?(:'url_rw')
    self.url_rw = attributes[:'url_rw']
  end

  if attributes.has_key?(:'url_ro')
    self.url_ro = attributes[:'url_ro']
  end

  if attributes.has_key?(:'last_commit')
    self.last_commit = attributes[:'last_commit']
  end

  if attributes.has_key?(:'branches')
    if (value = attributes[:'branches']).is_a?(Array)
      self.branches = value
    end
  end

  if attributes.has_key?(:'tags')
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = value
    end
  end

end