Sha256: 6ef2572a7c999f55a9828665b4bb8037d8bf86657ef4a6d4d7a97b1d9575fe3b
Contents?: true
Size: 705 Bytes
Versions: 4
Compression:
Stored size: 705 Bytes
Contents
require "isoics/version" require "json" require "isoics/ics" module Isoics class << self # Fetch ICS data by code. # @param code [String] # @param fieldcode [String] # @param groupcode [String] # @param subgroupcode [String] # @return [Isoics::ICS] def fetch(code = nil, fieldcode: nil, groupcode: nil, subgroupcode: nil) unless code || fieldcode raise(ArgumentError, "wrong arguments (should be string or { fieldcode: [String] }") end if code fieldcode, groupcode, subgroupcode = code.split "." end ICS.new(fieldcode: fieldcode, groupcode: groupcode, subgroupcode: subgroupcode) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
isoics-0.1.13 | lib/isoics.rb |
isoics-0.1.12 | lib/isoics.rb |
isoics-0.1.11 | lib/isoics.rb |
isoics-0.1.10 | lib/isoics.rb |