Class: NextcloudClient::Models::Directory
- Inherits:
-
Object
- Object
- NextcloudClient::Models::Directory
- Defined in:
- lib/nextcloud-client/models/directory.rb
Overview
Directory model
Class Attribute Summary collapse
-
.params ⇒ Object
readonly
Returns the value of attribute params.
Instance Attribute Summary collapse
-
#comments_count ⇒ String
Comments count.
-
#comments_href ⇒ String
Address of comments.
-
#comments_unread ⇒ String
Unread comments.
-
#contentlength ⇒ String
Length of content.
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#contenttype ⇒ String
Type of content.
-
#creationdate ⇒ String
Creation date time of file/directory.
-
#displayname ⇒ String
Display name of file/directory.
-
#favorite ⇒ String
Is favorited or not.
-
#fileid ⇒ String
Fileid.
-
#has_preview ⇒ String
Has preview or not.
-
#href ⇒ String
File/directory location.
-
#id ⇒ String
ID.
-
#lastmodified ⇒ String
Last modification time of file/directory.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#owner_display_name ⇒ String
Display name of owner.
-
#owner_id ⇒ String
Id of owner.
-
#permissions ⇒ String
Permissions.
-
#resourcetype ⇒ String
Type of a resource.
-
#share_types ⇒ String
Share types.
-
#tag ⇒ Hash
Etag.
Instance Method Summary collapse
-
#add(args) ⇒ Array
Adds content to collection.
-
#initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) ⇒ Directory
constructor
Initiates a model instance.
Constructor Details
#initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) ⇒ Directory
Initiates a model instance
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/nextcloud-client/models/directory.rb', line 49 def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end |
Class Attribute Details
.params ⇒ Object (readonly)
Returns the value of attribute params.
65 66 67 |
# File 'lib/nextcloud-client/models/directory.rb', line 65 def params @params end |
Instance Attribute Details
#comments_count ⇒ String
Returns Comments count.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#comments_href ⇒ String
Returns Address of comments.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#comments_unread ⇒ String
Returns Unread comments.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#contentlength ⇒ String
Returns Length of content.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#contents ⇒ Object
Returns the value of attribute contents.
44 45 46 |
# File 'lib/nextcloud-client/models/directory.rb', line 44 def contents @contents end |
#contenttype ⇒ String
Returns Type of content.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#creationdate ⇒ String
Returns Creation date time of file/directory.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#displayname ⇒ String
Returns Display name of file/directory.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#favorite ⇒ String
Returns Is favorited or not.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#fileid ⇒ String
Returns Fileid.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#has_preview ⇒ String
Returns Has preview or not.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#href ⇒ String
Returns File/directory location.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#id ⇒ String
Returns ID.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#lastmodified ⇒ String
Returns Last modification time of file/directory.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#meta ⇒ Object
Returns the value of attribute meta.
44 45 46 |
# File 'lib/nextcloud-client/models/directory.rb', line 44 def end |
#owner_display_name ⇒ String
Returns Display name of owner.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#owner_id ⇒ String
Returns Id of owner.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#permissions ⇒ String
Returns Permissions.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#resourcetype ⇒ String
Returns Type of a resource.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#share_types ⇒ String
Returns Share types.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
#tag ⇒ Hash
Returns Etag.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/nextcloud-client/models/directory.rb', line 43 class Directory attr_accessor :meta, :contents # Initiates a model instance # # @param [Hash] def initialize(href: nil, creationdate: nil, lastmodified: nil, tag: nil, resourcetype: nil, contenttype: nil, contentlength: nil, id: nil, fileid: nil, permissions: nil, size: nil, has_preview: nil, favorite: nil, comments_href: nil, comments_count: nil, comments_unread: nil, owner_id: nil, owner_display_name: nil, displayname: nil, share_types: nil, skip_contents: false) self.class.params.each do |v| instance_variable_set("@#{v}", instance_eval(v.to_s)) if instance_eval(v.to_s) end remove_instance_variable (:@skip_contents) if skip_contents end @params = instance_method(:initialize).parameters.map(&:last) @params.each { |p| instance_eval("attr_accessor :#{p}") } class << self attr_reader :params end # Adds content to collection # # @param [Hash] # @return [Array] Contents array def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end end |
Instance Method Details
#add(args) ⇒ Array
Adds content to collection
72 73 74 75 |
# File 'lib/nextcloud-client/models/directory.rb', line 72 def add(args) @contents = [] if @contents.nil? @contents << self.class.new(**args.merge(skip_contents: true)) end |