Class: Crystal::Meta

Inherits:
Object
  • Object
show all
Defined in:
lib/crystal/meta.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Meta

Returns a new instance of Meta.



3
4
5
# File 'lib/crystal/meta.rb', line 3

def initialize(options = {})
  @options = HashWithStringifyKeys.new(options)
end

Instance Method Details

#store(new_options) ⇒ Object



7
8
9
# File 'lib/crystal/meta.rb', line 7

def store(new_options)
  options.deep_merge!(HashWithStringifyKeys.new(new_options))
end

#tag_by_name(name) ⇒ Object



11
12
13
# File 'lib/crystal/meta.rb', line 11

def tag_by_name(name)
  tags.find_by_name(name)
end

#tags_by_pattern(pattern = //) ⇒ Object



15
16
17
# File 'lib/crystal/meta.rb', line 15

def tags_by_pattern(pattern = //)
  tags.filter(pattern)
end