Sha256: 77331334738f2394e5faaa165c56cd65b3fd64547cfe1f6d31a4bcddc7f1fa85

Contents?: true

Size: 798 Bytes

Versions: 1

Compression:

Stored size: 798 Bytes

Contents

module Rubyoverflow
  class ApiSite
    attr_reader :name, :logo_url, :api_endpoint, :site_url, :description, :icon_url, :state, :styling, :aliases
  
    def initialize(hash,url='')
      dash = ApiSiteDash.new hash
    
      @name = dash.name
      @logo_url = dash.logo_url
      @api_endpoint = dash.api_endpoint
      @site_url = dash.site_url
      @description = dash.description
      @icon_url = dash.icon_url
      @state = dash.state
      @styling = Styling.new dash.styling if dash.styling
      @aliases = dash.aliases
    end
  
  end

  class ApiSiteDash < BaseDash
    property :aliases
    property :name
    property :logo_url
    property :api_endpoint
    property :site_url
    property :description
    property :icon_url 
    property :state
    property :styling
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyoverflow-1.0.2 lib/rubyoverflow/apiSite.rb