class Genome::Core::Helpers::PropertyConfig

Attributes

nullable[R]
nullable?[R]
settable[R]
settable?[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/genome/core/helpers/property_config.rb, line 7
def initialize(options = {})
  @settable = options[:settable]
  @nullable = options[:nullable]
end

Public Instance Methods

to_h() click to toggle source
# File lib/genome/core/helpers/property_config.rb, line 19
def to_h
  {
    settable: settable,
    nullable: nullable
  }
end
valid?(property_value) click to toggle source
# File lib/genome/core/helpers/property_config.rb, line 13
def valid?(property_value)
  return false if !nullable && property_value == nil

  true
end