Permalink
Browse files

bugfixes thanks @fujibee

  • Loading branch information...
nov
nov committed Jan 3, 2009
1 parent 5157e51 commit d71b5c54f322041490686d896fef763a35d522d3
Showing with 24 additions and 21 deletions.
  1. +2 −2 iknow.gemspec
  2. +1 −1 lib/iknow/core/version.rb
  3. +8 −7 lib/iknow/model/item.rb
  4. +4 −2 lib/iknow/model/list.rb
  5. +9 −9 lib/iknow/model/sentence.rb
View
@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
s.name = %q{iknow}
- s.version = "0.2.3"
+ s.version = "0.2.4"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["nov"]
- s.date = %q{2008-12-24}
+ s.date = %q{2009-01-03}
s.description = %q{A rubygem for iKnow! APIs}
s.email = %q{developer@iknow.co.jp}
s.extra_rdoc_files = ["README", "ChangeLog"]
@@ -1,7 +1,7 @@
module Iknow::Version
MAJOR = 0
MINOR = 2
- REVISION = 3
+ REVISION = 4
class << self
def to_version
"#{MAJOR}.#{MINOR}.#{REVISION}"
View
@@ -4,7 +4,7 @@ class Iknow::Item < Iknow::Base
attr_accessor *(ATTRIBUTES - READONLY_ATTRIBUTES)
attr_reader *READONLY_ATTRIBUTES
- class Response
+ class Response < Iknow::Base
ATTRIBUTES = [:text, :text_with_character, :type, :language]
READONLY_ATTRIBUTES = [:type]
attr_accessor *(ATTRIBUTES - READONLY_ATTRIBUTES)
@@ -17,17 +17,18 @@ def initialize(params = {})
end
end
- class Cue
- ATTRIBUTES = [:text, :sound, :part_of_speech, :language]
+ class Cue < Iknow::Base
+ ATTRIBUTES = [:text, :sound, :part_of_speech, :language, :transliterations]
READONLY_ATTRIBUTES = [:sound]
attr_accessor *(ATTRIBUTES - READONLY_ATTRIBUTES)
attr_reader *READONLY_ATTRIBUTES
def initialize(params = {})
- @text = params[:text]
- @sound = params[:sound]
- @part_of_speech = params[:part_of_speech]
- @language = params[:language]
+ @text = params[:text]
+ @sound = params[:sound]
+ @part_of_speech = params[:part_of_speech]
+ @language = params[:language]
+ @transliterations = params[:transliterations]
end
end
View
@@ -22,8 +22,10 @@ class Iknow::List < Iknow::Base
attr_accessor *(ATTRIBUTES - READONLY_ATTRIBUTES)
attr_reader *READONLY_ATTRIBUTES
- class Application
- attr_reader :application, :list_id, :lang
+ class Application < Iknow::Base
+ ATTRIBUTES = [:application, :list_id, :lang]
+ attr_reader *ATTRIBUTES
+
def initialize(params = {})
@application = params[:application]
@list_id = params[:list_id]
@@ -28,16 +28,16 @@ def self.create(iknow_auth, params = {})
def initialize(params = {})
params[:translations] = [params[:translation]] if params[:translation]
params[:transliterations] = [params[:transliteration]] if params[:transliteration]
- @id = params[:id]
- @item = params[:item]
- @list = params[:list]
- @sound = params[:sound]
- @image = params[:image]
- @square_image = params[:square_image]
- @text = params[:text]
- @language = params[:language]
+ @id = params[:id]
+ @item = params[:item]
+ @list = params[:list]
+ @sound = params[:sound]
+ @image = params[:image]
+ @square_image = params[:square_image]
+ @text = params[:text]
+ @language = params[:language]
@transliterations = params[:transliterations]
- @translations = self.deserialize(params[:translations], :as => Iknow::Sentence)
+ @translations = self.deserialize(params[:translations], :as => Iknow::Sentence)
end
def save(iknow_auth)

0 comments on commit d71b5c5

Please sign in to comment.