Class: Cabriolet::Modifier::FileObject

Inherits:
Object
  • Object
show all
Defined in:
lib/cabriolet/modifier.rb

Overview

Simple file object for modified files

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, data:, attributes: nil, date: nil, time: nil) ⇒ FileObject

Returns a new instance of FileObject.



257
258
259
260
261
262
263
# File 'lib/cabriolet/modifier.rb', line 257

def initialize(name:, data:, attributes: nil, date: nil, time: nil)
  @name = name
  @data = data
  @attributes = attributes
  @date = date
  @time = time
end

Instance Attribute Details

#attributes ⇒ Object (readonly)

Returns the value of attribute attributes.



255
256
257
# File 'lib/cabriolet/modifier.rb', line 255

def attributes
  @attributes
end

#data ⇒ Object (readonly)

Returns the value of attribute data.



255
256
257
# File 'lib/cabriolet/modifier.rb', line 255

def data
  @data
end

#date ⇒ Object (readonly)

Returns the value of attribute date.



255
256
257
# File 'lib/cabriolet/modifier.rb', line 255

def date
  @date
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



255
256
257
# File 'lib/cabriolet/modifier.rb', line 255

def name
  @name
end

#time ⇒ Object (readonly)

Returns the value of attribute time.



255
256
257
# File 'lib/cabriolet/modifier.rb', line 255

def time
  @time
end

Instance Method Details

#size ⇒ Object



265
266
267
# File 'lib/cabriolet/modifier.rb', line 265

def size
  @data.bytesize
end