Class: YandexClient::Dav::PropFindResponse::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex_client/dav/prop_find_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, node) ⇒ Item

Returns a new instance of Item.



16
17
18
19
20
21
# File 'lib/yandex_client/dav/prop_find_response.rb', line 16

def initialize(name, node)
  @name = name
  @folder = node[:'d:resourcetype'].is_a?(Hash)

  load_node_data(node)
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



14
15
16
# File 'lib/yandex_client/dav/prop_find_response.rb', line 14

def content_type
  @content_type
end

#created_atObject (readonly)

Returns the value of attribute created_at.



14
15
16
# File 'lib/yandex_client/dav/prop_find_response.rb', line 14

def created_at
  @created_at
end

#last_modifiedObject (readonly)

Returns the value of attribute last_modified.



14
15
16
# File 'lib/yandex_client/dav/prop_find_response.rb', line 14

def last_modified
  @last_modified
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/yandex_client/dav/prop_find_response.rb', line 14

def name
  @name
end

Instance Method Details

#file?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/yandex_client/dav/prop_find_response.rb', line 27

def file?
  !@folder
end

#folder?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/yandex_client/dav/prop_find_response.rb', line 23

def folder?
  @folder
end