Class: Picdown::Source

Inherits:
Struct
  • Object
show all
Defined in:
lib/picdown/source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



4
5
6
# File 'lib/picdown/source.rb', line 4

def line
  @line
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



4
5
6
# File 'lib/picdown/source.rb', line 4

def url
  @url
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/picdown/source.rb', line 5

def valid?
  url.match?(URI::DEFAULT_PARSER.make_regexp)
end