Class: Prismic::Fragments::Date
- Defined in:
 - lib/prismic/fragments/date.rb
 
Instance Attribute Summary collapse
- 
  
    
      #value  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute value.
 
Instance Method Summary collapse
- 
  
    
      #as_html(link_resolver = nil)  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Generate an HTML representation of the fragment.
 - 
  
    
      #initialize(value)  ⇒ Date 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Date.
 
Methods inherited from Fragment
Constructor Details
#initialize(value) ⇒ Date
Returns a new instance of Date
      7 8 9  | 
    
      # File 'lib/prismic/fragments/date.rb', line 7 def initialize(value) @value = value end  | 
  
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value
      5 6 7  | 
    
      # File 'lib/prismic/fragments/date.rb', line 5 def value @value end  | 
  
Instance Method Details
#as_html(link_resolver = nil) ⇒ String
Generate an HTML representation of the fragment
      17 18 19  | 
    
      # File 'lib/prismic/fragments/date.rb', line 17 def as_html(link_resolver=nil) %(<time>#{value.iso8601(3)}</time>) end  |