class GitDS::BinaryPropertyDefinition

A definition of a ModelItem property that stores binary data.

Public Instance Methods

get(model, parent_path) click to toggle source

Read value from ModelItem at path in Model.

This just returns the raw binary value of the property file contents.

# File lib/git-ds/model/property.rb, line 145
def get(model, parent_path)
  model.get_item(path(parent_path))
end
set(model, parent_path, value) click to toggle source

Write a raw binary value to ModelItem at path in Model.

Note: this returns the raw binary data as written to the Property BLOB.

# File lib/git-ds/model/property.rb, line 154
def set(model, parent_path, value)
  write(model, path(parent_path), value)
  value
end
valid?(val) click to toggle source

Raw binary property values are always valid if they are not nil

# File lib/git-ds/model/property.rb, line 162
def valid?(val)
  val != nil
end