Class: Atnd4r::AtndEvent
- Inherits:
-
Object
- Object
- Atnd4r::AtndEvent
- Defined in:
- lib/atnd4r.rb
Instance Attribute Summary collapse
-
#accepted ⇒ Object
readonly
Returns the value of attribute accepted.
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#catch ⇒ Object
readonly
Returns the value of attribute catch.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#ended_at ⇒ Object
readonly
Returns the value of attribute ended_at.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#event_url ⇒ Object
readonly
Returns the value of attribute event_url.
-
#lat ⇒ Object
readonly
Returns the value of attribute lat.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#lon ⇒ Object
readonly
Returns the value of attribute lon.
-
#owner_id ⇒ Object
readonly
Returns the value of attribute owner_id.
-
#owner_nickname ⇒ Object
readonly
Returns the value of attribute owner_nickname.
-
#place ⇒ Object
readonly
Returns the value of attribute place.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
-
#waiting ⇒ Object
readonly
Returns the value of attribute waiting.
Instance Method Summary collapse
-
#initialize(event) ⇒ AtndEvent
constructor
XML オブジェクト.
Constructor Details
#initialize(event) ⇒ AtndEvent
XML オブジェクト
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/atnd4r.rb', line 183 def initialize(event) # 共通データ @accepted = AtndAPIUtil::to_ruby_type event.elements['accepted'] @event_id = AtndAPIUtil::to_ruby_type event.elements['event-id'] @updated_at = AtndAPIUtil::to_ruby_type event.elements['updated-at'] @title = AtndAPIUtil::to_ruby_type event.elements['title'] @waiting = AtndAPIUtil::to_ruby_type event.elements['waiting'] @event_url = AtndAPIUtil::to_ruby_type event.elements['event-url'] @limit = AtndAPIUtil::to_ruby_type event.elements['limit'] # 出席情報の場合 @users = [] event.elements.each('users/user') do |user| @users << AtndUser.new(user) end # イベント情報の場合 @place = AtndAPIUtil::to_ruby_type event.elements['place'] @lon = AtndAPIUtil::to_ruby_type event.elements['lon'] @ended_at = AtndAPIUtil::to_ruby_type event.elements['ended-at'] @url = AtndAPIUtil::to_ruby_type event.elements['url'] @owner_nickname = AtndAPIUtil::to_ruby_type event.elements['owner-nickname'] @catch = AtndAPIUtil::to_ruby_type event.elements['catch'] @description = AtndAPIUtil::to_ruby_type event.elements['description'] @owner_id = AtndAPIUtil::to_ruby_type event.elements['owner-id'] @lat = AtndAPIUtil::to_ruby_type event.elements['lat'] @address = AtndAPIUtil::to_ruby_type event.elements['address'] @started_at = AtndAPIUtil::to_ruby_type event.elements['started-at'] end |
Instance Attribute Details
#accepted ⇒ Object (readonly)
Returns the value of attribute accepted.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def accepted @accepted end |
#address ⇒ Object (readonly)
Returns the value of attribute address.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def address @address end |
#catch ⇒ Object (readonly)
Returns the value of attribute catch.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def catch @catch end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def description @description end |
#ended_at ⇒ Object (readonly)
Returns the value of attribute ended_at.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def ended_at @ended_at end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def event_id @event_id end |
#event_url ⇒ Object (readonly)
Returns the value of attribute event_url.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def event_url @event_url end |
#lat ⇒ Object (readonly)
Returns the value of attribute lat.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def lat @lat end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def limit @limit end |
#lon ⇒ Object (readonly)
Returns the value of attribute lon.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def lon @lon end |
#owner_id ⇒ Object (readonly)
Returns the value of attribute owner_id.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def owner_id @owner_id end |
#owner_nickname ⇒ Object (readonly)
Returns the value of attribute owner_nickname.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def owner_nickname @owner_nickname end |
#place ⇒ Object (readonly)
Returns the value of attribute place.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def place @place end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def started_at @started_at end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def title @title end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
215 216 217 |
# File 'lib/atnd4r.rb', line 215 def url @url end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
214 215 216 |
# File 'lib/atnd4r.rb', line 214 def users @users end |
#waiting ⇒ Object (readonly)
Returns the value of attribute waiting.
213 214 215 |
# File 'lib/atnd4r.rb', line 213 def waiting @waiting end |