Class: Kaltura::ObjectBase
- Inherits:
-
Object
- Object
- Kaltura::ObjectBase
show all
- Defined in:
- lib/kaltura/kaltura_client_base.rb
Direct Known Subclasses
AccessControl, AdminUser, BaseEntry, BaseRestriction, BaseSyndicationFeed, BulkUpload, BulkUploadResult, CEError, Category, ClientNotification, ConversionProfile, CropDimensions, EmailIngestionProfile, EntryContextDataParams, EntryContextDataResult, FileSync, Filter::BaseFilter, Filter::ReportInputFilter, FilterPager, FlavorAsset, FlavorAssetWithParams, FlavorParams, LiveStreamBitrate, MediaInfo, ModerationFlag, Partner, PartnerUsage, ReportGraph, ReportTable, ReportTotal, Response::BaseResponse, Response::SearchResultResponse, Response::StartWidgetSessionResponse, Response::UploadResponse, Search, SearchAuthData, StatsEvent, StatsKmcEvent, SyndicationFeedEntryCount, SystemPartnerConfiguration, SystemPartnerPackage, SystemPartnerUsageItem, SystemUser, UiConf, User, Widget
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#object_type ⇒ Object
Returns the value of attribute object_type.
186
187
188
|
# File 'lib/kaltura/kaltura_client_base.rb', line 186
def object_type
@object_type
end
|
Instance Method Details
#camelcase(val) ⇒ Object
210
211
212
213
|
# File 'lib/kaltura/kaltura_client_base.rb', line 210
def camelcase(val)
val = val.split('_').map { |e| e.capitalize }.join()
val[0,1].downcase + val[1,val.length]
end
|
#to_b(val) ⇒ Object
206
207
208
|
# File 'lib/kaltura/kaltura_client_base.rb', line 206
def to_b(val)
return [true, 'true', 1, '1'].include?(val.is_a?(String) ? val.downcase : val)
end
|
#to_params ⇒ Object
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
# File 'lib/kaltura/kaltura_client_base.rb', line 188
def to_params
params = {};
params["objectType"] = self.class.name.split('::').last
instance_variables.each do |var|
value = instance_variable_get(var)
var = var.to_s.sub('@', '')
kvar = camelcase(var)
if (value != nil)
if (value.is_a? ObjectBase)
params[kvar] = value.to_params;
else
params[kvar] = value;
end
end
end
return params;
end
|