Class: Handwritingio::Handwriting

Inherits:
Object
  • Object
show all
Defined in:
lib/handwritingio.rb

Overview

Handwriting class returned from Client#handwritings and Client#handwriting

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Handwriting

:nodoc:



184
185
186
187
188
189
190
191
192
193
# File 'lib/handwritingio.rb', line 184

def initialize(hash) #:nodoc:
  @id = hash['id']
  @title = hash['title']
  @date_created = DateTime.parse(hash['date_created'])
  @date_modified = DateTime.parse(hash['date_modified'])
  @rating_neatness = hash['rating_neatness']
  @rating_cursivity = hash['rating_cursivity']
  @rating_embellishment = hash['rating_embellishment']
  @rating_character_width = hash['rating_character_width']
end

Instance Attribute Details

#date_createdObject (readonly)

Returns the value of attribute date_created.



183
184
185
# File 'lib/handwritingio.rb', line 183

def date_created
  @date_created
end

#date_modifiedObject (readonly)

Returns the value of attribute date_modified.



183
184
185
# File 'lib/handwritingio.rb', line 183

def date_modified
  @date_modified
end

#idObject (readonly)

Returns the value of attribute id.



183
184
185
# File 'lib/handwritingio.rb', line 183

def id
  @id
end

#rating_character_widthObject (readonly)

Returns the value of attribute rating_character_width.



183
184
185
# File 'lib/handwritingio.rb', line 183

def rating_character_width
  @rating_character_width
end

#rating_cursivityObject (readonly)

Returns the value of attribute rating_cursivity.



183
184
185
# File 'lib/handwritingio.rb', line 183

def rating_cursivity
  @rating_cursivity
end

#rating_embellishmentObject (readonly)

Returns the value of attribute rating_embellishment.



183
184
185
# File 'lib/handwritingio.rb', line 183

def rating_embellishment
  @rating_embellishment
end

#rating_neatnessObject (readonly)

Returns the value of attribute rating_neatness.



183
184
185
# File 'lib/handwritingio.rb', line 183

def rating_neatness
  @rating_neatness
end

#titleObject (readonly)

Returns the value of attribute title.



183
184
185
# File 'lib/handwritingio.rb', line 183

def title
  @title
end

Class Method Details

.initialize_many(hashes) ⇒ Object

:nodoc:



199
200
201
# File 'lib/handwritingio.rb', line 199

def self.initialize_many(hashes) #:nodoc:
  hashes.map{ |hash| new(hash) }
end

Instance Method Details

#inspectObject

:nodoc:



195
196
197
# File 'lib/handwritingio.rb', line 195

def inspect #:nodoc:
  "#<#{self.class.name} id=#{@id.inspect} title=#{@title.inspect}>"
end