Class: NPR::Entity::Provider

Inherits:
Base
  • Object
show all
Defined in:
lib/npr/entity/provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concern::ShallowAttributes

included

Methods included from Concern::Relation

included

Constructor Details

#initialize(json) ⇒ Provider




11
12
13
14
# File 'lib/npr/entity/provider.rb', line 11

def initialize(json)
  @content = json["$text"]
  @url     = json["url"]
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



7
8
9
# File 'lib/npr/entity/provider.rb', line 7

def content
  @content
end

#urlObject

Returns the value of attribute url.



7
8
9
# File 'lib/npr/entity/provider.rb', line 7

def url
  @url
end

Instance Method Details

#to_sObject




18
19
20
# File 'lib/npr/entity/provider.rb', line 18

def to_s
  @content.to_s
end