Class: Prismic::Fragments::GeoPoint
- Defined in:
 - lib/prismic/fragments/geopoint.rb
 
Instance Attribute Summary collapse
- 
  
    
      #latitude  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute latitude.
 - 
  
    
      #longitude  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute longitude.
 
Instance Method Summary collapse
- 
  
    
      #as_html(link_resolver = nil)  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Generate an HTML representation of the fragment.
 - 
  
    
      #initialize(longitude, latitude)  ⇒ GeoPoint 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of GeoPoint.
 
Methods inherited from Fragment
Constructor Details
#initialize(longitude, latitude) ⇒ GeoPoint
Returns a new instance of GeoPoint
      7 8 9 10  | 
    
      # File 'lib/prismic/fragments/geopoint.rb', line 7 def initialize(longitude, latitude) @longitude = longitude @latitude = latitude end  | 
  
Instance Attribute Details
#latitude ⇒ Object
Returns the value of attribute latitude
      5 6 7  | 
    
      # File 'lib/prismic/fragments/geopoint.rb', line 5 def latitude @latitude end  | 
  
#longitude ⇒ Object
Returns the value of attribute longitude
      5 6 7  | 
    
      # File 'lib/prismic/fragments/geopoint.rb', line 5 def longitude @longitude end  | 
  
Instance Method Details
#as_html(link_resolver = nil) ⇒ String
Generate an HTML representation of the fragment
      18 19 20  | 
    
      # File 'lib/prismic/fragments/geopoint.rb', line 18 def as_html(link_resolver=nil) %(<div class="geopoint"><span class="longitude">#@longitude</span><span class="latitude">#@latitude</span></div>) end  |