Sha256: 57712a01f3999a8904fc71a3472aa0b8562532275f392371b38b8d4605dfb417

Contents?: true

Size: 656 Bytes

Versions: 26

Compression:

Stored size: 656 Bytes

Contents

module TheCity

  class Terminology < ApiObject

    tc_attr_accessor :term,
                     :label


    # Loads the terminology by the specified term.
    #
    # @param term The term of the Terminology to load.
    #
    # Returns a new {Terminology} object.
    def self.load_by_term(term)
      reader = TerminologyReader.new(term)
      self.new(reader.load_feed)
    rescue
      nil
    end       

    # Constructor.
    #
    # @param json_data JSON data of the Terminology.
    def initialize(json_data)
      @writer_object = TerminologyWriter
      self.term = json_data.keys[0]
      self.label = json_data.values[0]
    end

  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
the-city-admin-0.7.1 lib/api/terminology.rb
the-city-admin-0.7.0 lib/api/terminology.rb
the-city-admin-0.6.9 lib/api/terminology.rb
the-city-admin-0.6.8 lib/api/terminology.rb
the-city-admin-0.6.7 lib/api/terminology.rb
the-city-admin-0.6.6 lib/api/terminology.rb
the-city-admin-0.6.5 lib/api/terminology.rb
the-city-admin-0.6.4 lib/api/terminology.rb
the-city-admin-0.6.3 lib/api/terminology.rb
the-city-admin-0.6.2 lib/api/terminology.rb
the-city-admin-0.6.1 lib/api/terminology.rb
the-city-admin-0.6.0 lib/api/terminology.rb
the-city-admin-0.5.2 lib/api/terminology.rb
the-city-admin-0.5.1 lib/api/terminology.rb
the-city-admin-0.5.0 lib/api/terminology.rb
the-city-admin-0.4.0 lib/api/terminology.rb
the-city-admin-0.3.1 lib/api/terminology.rb
the-city-admin-0.3.0 lib/api/terminology.rb
the-city-admin-0.2.1 lib/api/terminology.rb
the-city-admin-0.2.0 lib/api/terminology.rb