Sha256: bc536f382f2133a4891c7cbfb7549bf0f507542a6f84fdf5349b07c7d23912b4

Contents?: true

Size: 409 Bytes

Versions: 6

Compression:

Stored size: 409 Bytes

Contents

module Oxidized
  class Source
    class NoConfig < OxidizedError; end

    def initialize
      @map = (Oxidized.config.model_map || {})
    end

    def map_model(model)
      @map.has_key?(model) ? @map[model] : model
    end

    def node_var_interpolate(var)
      case var
      when "nil"   then nil
      when "false" then false
      when "true"  then true
      else var
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
oxidized-0.28.0 lib/oxidized/source/source.rb
oxidized-0.27.0 lib/oxidized/source/source.rb
oxidized-0.26.3 lib/oxidized/source/source.rb
oxidized-0.26.2 lib/oxidized/source/source.rb
oxidized-0.26.1 lib/oxidized/source/source.rb
oxidized-0.26.0 lib/oxidized/source/source.rb