Class: TripleParser::TMaker
- Inherits:
-
Object
- Object
- TripleParser::TMaker
- Defined in:
- lib/triple_parser/t_maker.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#rdf_style ⇒ Object
Returns the value of attribute rdf_style.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ TMaker
constructor
A new instance of TMaker.
- #split_text ⇒ Object
- #third ⇒ Object
Constructor Details
#initialize(*args) ⇒ TMaker
Returns a new instance of TMaker.
17 18 19 |
# File 'lib/triple_parser/t_maker.rb', line 17 def initialize(*args) @string = args.first end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/triple_parser/t_maker.rb', line 10 def arguments @arguments end |
#rdf_style ⇒ Object
Returns the value of attribute rdf_style.
10 11 12 |
# File 'lib/triple_parser/t_maker.rb', line 10 def rdf_style @rdf_style end |
#url ⇒ Object
Returns the value of attribute url.
10 11 12 |
# File 'lib/triple_parser/t_maker.rb', line 10 def url @url end |
Class Method Details
.brew(*args) ⇒ Object
12 13 14 15 |
# File 'lib/triple_parser/t_maker.rb', line 12 def self.brew(*args) t_maker = new(*args) t_maker.third end |
Instance Method Details
#split_text ⇒ Object
36 37 38 |
# File 'lib/triple_parser/t_maker.rb', line 36 def split_text @split_text ||= get_split_text end |
#third ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/triple_parser/t_maker.rb', line 21 def third begin Third.new( @string, :type => split_text.type, :value => split_text.value, :url => split_text.url, :rdf_style => split_text.rdf_style, :arguments => split_text.arguments ) rescue Third.new(@string, :rdf_style => 'unknown') end end |