Class: Nelumba::Place

Inherits:
Object
  • Object
show all
Includes:
Object
Defined in:
lib/nelumba/place.rb

Constant Summary

Constants included from Object

Object::USERNAME_REGULAR_EXPRESSION

Instance Attribute Summary collapse

Attributes included from Object

#author, #content, #display_name, #html, #image, #published, #summary, #text, #title, #uid, #updated, #url

Instance Method Summary collapse

Methods included from Object

#mentions, #reply_to, #to_as1, #to_html, #to_json, #to_text

Constructor Details

#initialize(options = {}, &blk) ⇒ Place

Returns a new instance of Place.



8
9
10
# File 'lib/nelumba/place.rb', line 8

def initialize(options = {}, &blk)
  init(options, &blk)
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/nelumba/place.rb', line 6

def address
  @address
end

#positionObject (readonly)

Returns the value of attribute position.



5
6
7
# File 'lib/nelumba/place.rb', line 5

def position
  @position
end

Instance Method Details

#init(options = {}, &blk) ⇒ Object



12
13
14
15
16
17
# File 'lib/nelumba/place.rb', line 12

def init(options = {}, &blk)
  super(options, &blk)

  @position = options[:position]
  @address  = options[:address]
end

#to_hashObject



19
20
21
22
23
24
# File 'lib/nelumba/place.rb', line 19

def to_hash
  {
    :position => @position,
    :address  => @address
  }.merge(super)
end

#to_json_hashObject



26
27
28
29
30
31
32
# File 'lib/nelumba/place.rb', line 26

def to_json_hash
  {
    :objectType => "place",
    :position   => @position,
    :address    => @address
  }.merge(super)
end