Class: Less::Loader::FS::Buffer
- Inherits:
-
Object
- Object
- Less::Loader::FS::Buffer
- Defined in:
- lib/less/loader.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(path) ⇒ Buffer
constructor
A new instance of Buffer.
- #length ⇒ Object
- #toString(*args) ⇒ Object
Constructor Details
#initialize(path) ⇒ Buffer
Returns a new instance of Buffer.
103 104 105 |
# File 'lib/less/loader.rb', line 103 def initialize(path) @data = File.read(path) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
101 102 103 |
# File 'lib/less/loader.rb', line 101 def data @data end |
Instance Method Details
#length ⇒ Object
107 108 109 |
# File 'lib/less/loader.rb', line 107 def length @data.length end |
#toString(*args) ⇒ Object
111 112 113 114 115 116 117 |
# File 'lib/less/loader.rb', line 111 def toString(*args) if args.last == "base64" Base64.strict_encode64(@data) else @data end end |