Sha256: a0d95d22d0d14f32e5139b73ba013055a3b1d50b8b138ec1c11ef312fa2d9b2a

Contents?: true

Size: 919 Bytes

Versions: 1

Compression:

Stored size: 919 Bytes

Contents

require File.expand_path("../config", __FILE__)
require File.expand_path("../constant", __FILE__)
require File.expand_path("../initializer", __FILE__)
require File.expand_path("../word_for", __FILE__)
require File.expand_path("../authentication", __FILE__)

module WhowishWord
  include WhowishWord::Constant
  include WhowishWord::Initializer
  include WhowishWord::WordFor
  include WhowishWord::Authentication
  
  attr_accessor :words
  
  def init(orm_engine = :active_record)
    
    @orm_engine = orm_engine
    
    init_username_and_password
    install_route
    install_hook
    load_rails
    
    run_database_migration
    
    words = WhowishWordHtml.all()
      
    @words = {}
    words.each { |word|
      @words[word.word_id] = word.content
    }
    
  end
  
  def add_or_set_word(word_id, content)
    @words[word_id] = content
  end

  extend self
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whowish_word-0.3.1 lib/whowish_word/whowish_word.rb