Class: OpConnect::Item::File

Inherits:
Object
  • Object
show all
Defined in:
lib/op_connect/item/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ File

Returns a new instance of File.



6
7
8
9
10
11
12
13
# File 'lib/op_connect/item/file.rb', line 6

def initialize(options = {})
  @id = options["id"]
  @name = options["name"]
  @size = options["size"]
  @content_path = options["content_path"]
  @content = options["content"]
  @section = Object.new(options["section"])
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



4
5
6
# File 'lib/op_connect/item/file.rb', line 4

def content
  @content
end

#content_pathObject (readonly)

Returns the value of attribute content_path.



4
5
6
# File 'lib/op_connect/item/file.rb', line 4

def content_path
  @content_path
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/op_connect/item/file.rb', line 4

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/op_connect/item/file.rb', line 4

def name
  @name
end

#sectionObject (readonly)

Returns the value of attribute section.



4
5
6
# File 'lib/op_connect/item/file.rb', line 4

def section
  @section
end

#sizeObject (readonly)

Returns the value of attribute size.



4
5
6
# File 'lib/op_connect/item/file.rb', line 4

def size
  @size
end