Sha256: 046176b8a51ef1c5edf14ab46bc2f4928939fb476b8904b872b20b5ac8b0169a
Contents?: true
Size: 1.43 KB
Versions: 8
Compression:
Stored size: 1.43 KB
Contents
#!/usr/bin/env ruby # encoding: UTF-8 # (c) Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module Lorj # Specific ALL Ruby functions, but incompatible with some other version. module MetaRubySpec # Public functions module Public # layer setting function # # * *Args* # - +type+ : :sections by default. Define the section type name. # - +section+ : Symbol. Section name of the data to define. # - +keys+ : 1 Symbol or more Symbols. Name of the data and options. # - +options+ : Hash. List of options # # * *Returns* # - The value set or nil # def []=(type, section, *prop) keys = prop.clone options = {} options = keys.pop if keys[-1].is_a?(Hash) return nil if keys.length == 0 set(type, section, keys, options) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems