Class: HatenaFotolife::Image
- Inherits:
-
Object
- Object
- HatenaFotolife::Image
- Defined in:
- lib/hatena_fotolife/image.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image_uri ⇒ Object
readonly
Returns the value of attribute image_uri.
-
#image_uri_medium ⇒ Object
readonly
Returns the value of attribute image_uri_medium.
-
#image_uri_small ⇒ Object
readonly
Returns the value of attribute image_uri_small.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Class Method Summary collapse
-
.load_xml(xml) ⇒ HatenaFotolife::Image
Create a new image from a XML string.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/hatena_fotolife/image.rb', line 7 def id @id end |
#image_uri ⇒ Object (readonly)
Returns the value of attribute image_uri.
7 8 9 |
# File 'lib/hatena_fotolife/image.rb', line 7 def image_uri @image_uri end |
#image_uri_medium ⇒ Object (readonly)
Returns the value of attribute image_uri_medium.
7 8 9 |
# File 'lib/hatena_fotolife/image.rb', line 7 def image_uri_medium @image_uri_medium end |
#image_uri_small ⇒ Object (readonly)
Returns the value of attribute image_uri_small.
7 8 9 |
# File 'lib/hatena_fotolife/image.rb', line 7 def image_uri_small @image_uri_small end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/hatena_fotolife/image.rb', line 7 def title @title end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
7 8 9 |
# File 'lib/hatena_fotolife/image.rb', line 7 def uri @uri end |
Class Method Details
.load_xml(xml) ⇒ HatenaFotolife::Image
Create a new image from a XML string.
12 13 14 |
# File 'lib/hatena_fotolife/image.rb', line 12 def self.load_xml(xml) HatenaFotolife::Image.new(xml) end |
Instance Method Details
#to_xml ⇒ String
17 18 19 |
# File 'lib/hatena_fotolife/image.rb', line 17 def to_xml @document.to_s.gsub(/\"/, "'") end |